Class AbstractAccessTokenCookieConfigurationProperties
java.lang.Object
io.micronaut.security.token.cookie.AbstractAccessTokenCookieConfigurationProperties
- All Implemented Interfaces:
- io.micronaut.core.util.Toggleable,- io.micronaut.http.cookie.CookieConfiguration,- TokenCookieConfiguration
- Direct Known Subclasses:
- RefreshTokenCookieConfigurationProperties,- TokenCookieConfigurationProperties
public abstract class AbstractAccessTokenCookieConfigurationProperties
extends Object
implements TokenCookieConfiguration
Base class for cookie configuration properties classes.
- Since:
- 3.4.2
- Author:
- Álvaro Sánchez-Mariscal
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionOptional<io.micronaut.http.cookie.SameSite>voidsetCookieDomain(@Nullable String cookieDomain) Sets the domain name of this Cookie.voidsetCookieHttpOnly(Boolean cookieHttpOnly) Whether the Cookie can only be accessed via HTTP.voidsetCookieMaxAge(Duration cookieMaxAge) Sets the maximum age of the cookie.voidsetCookieSameSite(@Nullable io.micronaut.http.cookie.SameSite cookieSameSite) Sets the same-site setting of the cookie.voidsetCookieSecure(Boolean cookieSecure) Sets whether the cookie is secured.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.http.cookie.CookieConfigurationgetCookieName, getCookiePathMethods inherited from interface io.micronaut.core.util.ToggleableisEnabled
- 
Field Details- 
DEFAULT_HTTPONLYpublic static final boolean DEFAULT_HTTPONLYThe default http only value.- See Also:
 
- 
DEFAULT_COOKIESAMESITEpublic static final io.micronaut.http.cookie.SameSite DEFAULT_COOKIESAMESITEThe default same-site setting for the JWT cookie.
- 
cookieDomain
- 
cookieHttpOnly
- 
cookieSecure
- 
cookieMaxAge
- 
cookieSameSiteprotected io.micronaut.http.cookie.SameSite cookieSameSite
 
- 
- 
Constructor Details- 
AbstractAccessTokenCookieConfigurationPropertiespublic AbstractAccessTokenCookieConfigurationProperties()
 
- 
- 
Method Details- 
getCookieDomain- Specified by:
- getCookieDomainin interface- io.micronaut.http.cookie.CookieConfiguration
- Returns:
- the domain name of this Cookie
 
- 
isCookieHttpOnly- Specified by:
- isCookieHttpOnlyin interface- io.micronaut.http.cookie.CookieConfiguration
- Returns:
- Whether the Cookie can only be accessed via HTTP.
 
- 
isCookieSecure- Specified by:
- isCookieSecurein interface- io.micronaut.http.cookie.CookieConfiguration
- Returns:
- True if the cookie is secure
 
- 
getCookieMaxAge- Specified by:
- getCookieMaxAgein interface- io.micronaut.http.cookie.CookieConfiguration
- Returns:
- The max age to use for the cookie
 
- 
getCookieSameSite- Specified by:
- getCookieSameSitein interface- io.micronaut.http.cookie.CookieConfiguration
 
- 
setCookieDomainSets the domain name of this Cookie.- Parameters:
- cookieDomain- the domain name of this Cookie
 
- 
setCookieHttpOnlyWhether the Cookie can only be accessed via HTTP. Default value (true).- Parameters:
- cookieHttpOnly- Whether the Cookie can only be accessed via HTTP
 
- 
setCookieSecureSets whether the cookie is secured. Defaults to the secure status of the request.- Parameters:
- cookieSecure- True if the cookie is secure
 
- 
setCookieMaxAgeSets the maximum age of the cookie.- Parameters:
- cookieMaxAge- The maximum age of the cookie
 
- 
setCookieSameSitepublic void setCookieSameSite(@Nullable @Nullable io.micronaut.http.cookie.SameSite cookieSameSite) Sets the same-site setting of the cookie. Default value null. Value is case sensitive. Allowed values: `Strict`, `Lax` or `None`.- Parameters:
- cookieSameSite- The same-site setting of the cookie.
 
 
-