Package com.google.gerrit.httpd
Class CacheBasedWebSession
- java.lang.Object
-
- com.google.gerrit.httpd.WebSession
-
- com.google.gerrit.httpd.CacheBasedWebSession
-
- Direct Known Subclasses:
H2CacheBasedWebSession
public abstract class CacheBasedWebSession extends WebSession
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACCOUNT_COOKIE
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, AccountCache byIdCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class com.google.gerrit.httpd.WebSession
addRefUpdatedEvents, getRefUpdatedEvents, resetRefUpdatedEvents
-
-
-
-
Field Detail
-
ACCOUNT_COOKIE
public static final String ACCOUNT_COOKIE
- See Also:
- Constant Field Values
-
MAX_AGE_MINUTES
public static final long MAX_AGE_MINUTES
-
-
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, AccountCache byIdCache)
-
-
Method Detail
-
isSignedIn
public boolean isSignedIn()
- Specified by:
isSignedIn
in classWebSession
-
getXGerritAuth
public String getXGerritAuth()
- Specified by:
getXGerritAuth
in classWebSession
-
isValidXGerritAuth
public boolean isValidXGerritAuth(String keyIn)
- Specified by:
isValidXGerritAuth
in classWebSession
-
isAccessPathOk
public boolean isAccessPathOk(AccessPath path)
- Specified by:
isAccessPathOk
in classWebSession
-
setAccessPathOk
public void setAccessPathOk(AccessPath path, boolean ok)
- Specified by:
setAccessPathOk
in classWebSession
-
getUser
public CurrentUser getUser()
- Specified by:
getUser
in classWebSession
-
login
public void login(AuthResult res, boolean rememberMe)
- Specified by:
login
in classWebSession
-
setUserAccountId
public void setUserAccountId(Account.Id id)
Set the user account for this current request only.- Specified by:
setUserAccountId
in classWebSession
-
logout
public void logout()
- Specified by:
logout
in classWebSession
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in classWebSession
-
-