Package com.google.gerrit.httpd
Class CacheBasedWebSession
- java.lang.Object
-
- com.google.gerrit.httpd.CacheBasedWebSession
-
- All Implemented Interfaces:
WebSession
- Direct Known Subclasses:
H2CacheBasedWebSession
public abstract class CacheBasedWebSession extends Object implements WebSession
-
-
Field Summary
Fields Modifier and Type Field Description protected static long
MAX_AGE_MINUTES
-
Constructor Summary
Constructors Modifier Constructor Description protected
CacheBasedWebSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, WebSessionManager manager, AuthConfig authConfig, com.google.inject.Provider<AnonymousUser> anonymousProvider, IdentifiedUser.RequestFactory identified)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalId.Key
getLastLoginExternalId()
String
getSessionId()
CurrentUser
getUser()
String
getXGerritAuth()
boolean
isAccessPathOk(AccessPath path)
boolean
isSignedIn()
boolean
isValidXGerritAuth(String keyIn)
void
login(AuthResult res, boolean rememberMe)
void
logout()
void
setAccessPathOk(AccessPath path, boolean ok)
void
setUserAccountId(Account.Id id)
Set the user account for this current request only.
-
-
-
Constructor Detail
-
CacheBasedWebSession
protected CacheBasedWebSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, WebSessionManager manager, AuthConfig authConfig, com.google.inject.Provider<AnonymousUser> anonymousProvider, IdentifiedUser.RequestFactory identified)
-
-
Method Detail
-
isSignedIn
public boolean isSignedIn()
- Specified by:
isSignedIn
in interfaceWebSession
-
getXGerritAuth
public String getXGerritAuth()
- Specified by:
getXGerritAuth
in interfaceWebSession
-
isValidXGerritAuth
public boolean isValidXGerritAuth(String keyIn)
- Specified by:
isValidXGerritAuth
in interfaceWebSession
-
isAccessPathOk
public boolean isAccessPathOk(AccessPath path)
- Specified by:
isAccessPathOk
in interfaceWebSession
-
setAccessPathOk
public void setAccessPathOk(AccessPath path, boolean ok)
- Specified by:
setAccessPathOk
in interfaceWebSession
-
getLastLoginExternalId
public ExternalId.Key getLastLoginExternalId()
- Specified by:
getLastLoginExternalId
in interfaceWebSession
-
getUser
public CurrentUser getUser()
- Specified by:
getUser
in interfaceWebSession
-
login
public void login(AuthResult res, boolean rememberMe)
- Specified by:
login
in interfaceWebSession
-
setUserAccountId
public void setUserAccountId(Account.Id id)
Set the user account for this current request only.- Specified by:
setUserAccountId
in interfaceWebSession
-
logout
public void logout()
- Specified by:
logout
in interfaceWebSession
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in interfaceWebSession
-
-