@ConfigurationProperties(value="http") public class HttpSessionConfiguration extends SessionConfiguration implements CookieConfiguration
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_BASE64ENCODE
The default base64 encode value.
|
static java.lang.String |
DEFAULT_COOKIENAME
Cookie name.
|
static java.lang.String |
DEFAULT_COOKIEPATH
Default Cookie Path.
|
static boolean |
DEFAULT_REMEMBERME
The default remember me value.
|
DEFAULT_MAXINACTIVEINTERVAL_MINUTES
Constructor and Description |
---|
HttpSessionConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getCookieDomain()
Gets the domain name of this Cookie.
|
java.util.Optional<java.time.temporal.TemporalAmount> |
getCookieMaxAge() |
java.lang.String |
getCookieName() |
java.util.Optional<java.lang.String> |
getCookiePath()
The path of the cookie.
|
java.util.Optional<SameSite> |
getCookieSameSite() |
java.util.Optional<java.lang.String> |
getDomainName() |
java.lang.String[] |
getHeaderNames() |
java.util.Optional<java.lang.String> |
getPrefix() |
boolean |
isBase64Encode() |
java.util.Optional<java.lang.Boolean> |
isCookieHttpOnly()
Checks to see if this
Cookie can only be accessed via HTTP. |
java.util.Optional<java.lang.Boolean> |
isCookieSecure() |
boolean |
isRememberMe() |
void |
setBase64Encode(boolean base64Encode)
Default value (true).
|
void |
setCookieDomain(java.lang.String cookieDomain) |
void |
setCookieMaxAge(java.time.temporal.TemporalAmount cookieMaxAge)
Sets the maximum age of the cookie.
|
void |
setCookieName(java.lang.String cookieName)
Default value ("SESSION").
|
void |
setCookiePath(java.lang.String cookiePath) |
void |
setCookieSameSite(SameSite sameSite)
Determines if this this
Cookie can be sent along cross-site requests. |
void |
setCookieSecure(java.lang.Boolean cookieSecure)
Sets the secure status of the cookie.
|
void |
setDomainName(java.lang.String domainName) |
void |
setHeaderNames(java.lang.String[] headerNames)
Default values (["Authorization-Info", "X-Auth-Token"]).
|
void |
setPrefix(java.lang.String prefix) |
void |
setRememberMe(boolean rememberMe)
Default value (false).
|
getExecutorService, getMaxActiveSessions, getMaxInactiveInterval, isPromptExpiration, setExecutorService, setMaxActiveSessions, setMaxInactiveInterval, setPromptExpiration
public static final java.lang.String DEFAULT_COOKIEPATH
public static final java.lang.String DEFAULT_COOKIENAME
public static final boolean DEFAULT_REMEMBERME
public static final boolean DEFAULT_BASE64ENCODE
public boolean isBase64Encode()
public void setBase64Encode(boolean base64Encode)
base64Encode
- Enable the Base64 encode for sessions IDs sent back to clientspublic java.lang.String getCookieName()
getCookieName
in interface CookieConfiguration
public void setCookieName(java.lang.String cookieName)
cookieName
- Set the cookie name to usepublic java.util.Optional<java.lang.String> getPrefix()
public void setPrefix(java.lang.String prefix)
prefix
- Set the prefix to use when serializing session IDpublic java.lang.String[] getHeaderNames()
public void setHeaderNames(java.lang.String[] headerNames)
headerNames
- Set the header names when using a Header strategypublic java.util.Optional<java.lang.String> getCookiePath()
CookieConfiguration
getCookiePath
in interface CookieConfiguration
public java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
CookieConfiguration
Cookie
can only be accessed via HTTP.isCookieHttpOnly
in interface CookieConfiguration
public void setCookiePath(java.lang.String cookiePath)
cookiePath
- Set the cookie path to use. Default value ("/").public java.util.Optional<java.lang.String> getDomainName()
public java.util.Optional<java.lang.String> getCookieDomain()
CookieConfiguration
getCookieDomain
in interface CookieConfiguration
public void setDomainName(java.lang.String domainName)
domainName
- Set the domain name to use for the cookiepublic void setCookieDomain(java.lang.String cookieDomain)
cookieDomain
- Set the domain name to use for the cookiepublic java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
getCookieMaxAge
in interface CookieConfiguration
public void setCookieMaxAge(java.time.temporal.TemporalAmount cookieMaxAge)
cookieMaxAge
- The maximum age of the cookiepublic boolean isRememberMe()
public void setRememberMe(boolean rememberMe)
rememberMe
- Enable the remember me settingpublic java.util.Optional<java.lang.Boolean> isCookieSecure()
isCookieSecure
in interface CookieConfiguration
public void setCookieSecure(java.lang.Boolean cookieSecure)
HttpRequest.isSecure()
if not set.cookieSecure
- Whether or not the cookie is secure.public java.util.Optional<SameSite> getCookieSameSite()
getCookieSameSite
in interface CookieConfiguration