public static class ClientSideSessionsModule.Config extends Object
Modifier and Type | Field and Description |
---|---|
static TypeToken<ClientSideSessionsModule.Config> |
COOKIE_SESSION_CONFIG_TYPE_TOKEN
Used to get cookie based session configuration.
|
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
String |
getCipherAlgorithm() |
String |
getDomain()
Use the session cookie only when requesting from the
domain . |
String |
getMacAlgorithm() |
int |
getMaxCookieSize()
Maximum size of the session cookie.
|
Duration |
getMaxInactivityInterval()
Maximum inactivity time (in units defined by
TimeUnit ) after which session will be invalidated. |
String |
getPath()
Use the session cookie only when requesting from the
path . |
String |
getSecretKey() |
String |
getSecretToken() |
String |
getSessionName() |
SessionService |
getSessionService() |
void |
setCipherAlgorithm(String cipherAlgorithm) |
void |
setDomain(String domain)
Set the
domain for session cookie. |
void |
setMacAlgorithm(String macAlgorithm) |
void |
setMaxCookieSize(int maxCookieSize)
Set maximum size of the session cookie.
|
void |
setMaxInactivityInterval(Duration maxInactivityInterval)
Set maximum inactivity time (in seconds) of the cookie session.
|
void |
setPath(String path)
Set the
path for session cookie. |
void |
setSecretKey(String secretKey) |
void |
setSecretToken(String secretToken) |
void |
setSessionName(String sessionName) |
void |
setSessionService(SessionService sessionService) |
public static final TypeToken<ClientSideSessionsModule.Config> COOKIE_SESSION_CONFIG_TYPE_TOKEN
public String getSessionName()
public void setSessionName(String sessionName)
public String getSecretToken()
public void setSecretToken(String secretToken)
public String getMacAlgorithm()
public void setMacAlgorithm(String macAlgorithm)
public String getSecretKey()
public void setSecretKey(String secretKey)
public String getCipherAlgorithm()
public void setCipherAlgorithm(String cipherAlgorithm)
public String getPath()
path
.
Define the scope of the cookie.
Session should be send for every request. The path
of value "/"
does this.
public void setPath(String path)
path
for session cookie.
Define the scope of the cookie.
path
- a path to which session cookie will be attached topublic String getDomain()
domain
.
Define the scope for the cookie.
public void setDomain(String domain)
domain
for session cookie.
Define the scope of the cookie
domain
- a domain to which session cokkie will be attached topublic int getMaxCookieSize()
According to the RFC 2109 web cookies should be at least 4096 bytes per cookie and at least 20 cookies per domain should be supported.
Default value of maximum cookie size is set to 2048
.
public void setMaxCookieSize(int maxCookieSize)
If it is less than 1024
or greater than 4096
default value will be used.
maxCookieSize
- a maximum size of one session cookie.public Duration getMaxInactivityInterval()
TimeUnit
) after which session will be invalidated.
If it is -1
inactivity is unlimited. the 0
value means that session is always invalid.
If time between last access and current time is less than or equal to max inactive time, session will become valid.
public void setMaxInactivityInterval(Duration maxInactivityInterval)
maxInactivityInterval
- a maximum inactivity time of the cookie sessionpublic SessionService getSessionService()
public void setSessionService(SessionService sessionService)