@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 String |
DEFAULT_COOKIENAME
Cookie name.
|
static 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 |
---|---|
Optional<String> |
getCookieDomain()
Gets the domain name of this Cookie.
|
Optional<TemporalAmount> |
getCookieMaxAge() |
String |
getCookieName() |
Optional<String> |
getCookiePath()
The path of the cookie.
|
Optional<SameSite> |
getCookieSameSite() |
Optional<String> |
getDomainName() |
String[] |
getHeaderNames() |
Optional<String> |
getPrefix() |
boolean |
isBase64Encode() |
Optional<Boolean> |
isCookieHttpOnly()
Checks to see if this
Cookie can only be accessed via HTTP. |
Optional<Boolean> |
isCookieSecure() |
boolean |
isRememberMe() |
void |
setBase64Encode(boolean base64Encode)
Default value (true).
|
void |
setCookieDomain(String cookieDomain) |
void |
setCookieMaxAge(TemporalAmount cookieMaxAge)
Sets the maximum age of the cookie.
|
void |
setCookieName(String cookieName)
Default value ("SESSION").
|
void |
setCookiePath(String cookiePath) |
void |
setCookieSameSite(SameSite sameSite)
Determines if this this
Cookie can be sent along cross-site requests. |
void |
setCookieSecure(Boolean cookieSecure)
Sets the secure status of the cookie.
|
void |
setDomainName(String domainName) |
void |
setHeaderNames(String[] headerNames)
Default values (["Authorization-Info", "X-Auth-Token"]).
|
void |
setPrefix(String prefix) |
void |
setRememberMe(boolean rememberMe)
Default value (false).
|
getExecutorService, getMaxActiveSessions, getMaxInactiveInterval, isPromptExpiration, setExecutorService, setMaxActiveSessions, setMaxInactiveInterval, setPromptExpiration
public static final String DEFAULT_COOKIEPATH
public static final 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 String getCookieName()
getCookieName
in interface CookieConfiguration
public void setCookieName(String cookieName)
cookieName
- Set the cookie name to usepublic Optional<String> getPrefix()
public void setPrefix(String prefix)
prefix
- Set the prefix to use when serializing session IDpublic String[] getHeaderNames()
public void setHeaderNames(String[] headerNames)
headerNames
- Set the header names when using a Header strategypublic Optional<String> getCookiePath()
CookieConfiguration
getCookiePath
in interface CookieConfiguration
public Optional<Boolean> isCookieHttpOnly()
CookieConfiguration
Cookie
can only be accessed via HTTP.isCookieHttpOnly
in interface CookieConfiguration
public void setCookiePath(String cookiePath)
cookiePath
- Set the cookie path to use. Default value ("/").public Optional<String> getDomainName()
public Optional<String> getCookieDomain()
CookieConfiguration
getCookieDomain
in interface CookieConfiguration
public void setDomainName(String domainName)
domainName
- Set the domain name to use for the cookiepublic void setCookieDomain(String cookieDomain)
cookieDomain
- Set the domain name to use for the cookiepublic Optional<TemporalAmount> getCookieMaxAge()
getCookieMaxAge
in interface CookieConfiguration
public void setCookieMaxAge(TemporalAmount cookieMaxAge)
cookieMaxAge
- The maximum age of the cookiepublic boolean isRememberMe()
public void setRememberMe(boolean rememberMe)
rememberMe
- Enable the remember me settingpublic Optional<Boolean> isCookieSecure()
isCookieSecure
in interface CookieConfiguration
public void setCookieSecure(Boolean cookieSecure)
HttpRequest.isSecure()
if not set.cookieSecure
- Whether or not the cookie is secure.public Optional<SameSite> getCookieSameSite()
getCookieSameSite
in interface CookieConfiguration