@Requires(condition=CookieBasedAuthenticationModeCondition.class) @Requires(property="micronaut.security.token.refresh.cookie.enabled",notEquals="false",defaultValue="true") @ConfigurationProperties(value="micronaut.security.token.refresh.cookie") public class RefreshTokenCookieConfigurationProperties extends java.lang.Object implements RefreshTokenCookieConfiguration
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_COOKIENAME
The default cookie name.
|
static java.lang.String |
DEFAULT_COOKIEPATH
Default Cookie Path.
|
static io.micronaut.http.cookie.SameSite |
DEFAULT_COOKIESAMESITE
The default same-site setting for the JWT cookie.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static boolean |
DEFAULT_HTTPONLY
The default http only value.
|
static boolean |
DEFAULT_SECURE
The default secure value.
|
static java.lang.String |
PREFIX |
Constructor and Description |
---|
RefreshTokenCookieConfigurationProperties(java.lang.String oauthControllerPath) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getCookieDomain() |
java.util.Optional<java.time.temporal.TemporalAmount> |
getCookieMaxAge() |
java.lang.String |
getCookieName() |
java.util.Optional<java.lang.String> |
getCookiePath() |
java.util.Optional<io.micronaut.http.cookie.SameSite> |
getCookieSameSite() |
java.util.Optional<java.lang.Boolean> |
isCookieHttpOnly() |
java.util.Optional<java.lang.Boolean> |
isCookieSecure() |
boolean |
isEnabled() |
void |
setCookieDomain(java.lang.String cookieDomain)
Sets the domain name of this Cookie.
|
void |
setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
Whether the Cookie can only be accessed via HTTP.
|
void |
setCookieMaxAge(java.time.Duration cookieMaxAge)
Sets the maximum age of the cookie.
|
void |
setCookieName(java.lang.String cookieName)
Cookie Name.
|
void |
setCookiePath(java.lang.String cookiePath)
Sets the path of the cookie.
|
void |
setCookieSameSite(io.micronaut.http.cookie.SameSite cookieSameSite)
Sets the same-site setting of the cookie.
|
void |
setCookieSecure(java.lang.Boolean cookieSecure)
Sets whether the cookie is secured.
|
void |
setEnabled(boolean enabled)
Sets whether JWT cookie configuration is enabled.
|
public static final java.lang.String PREFIX
public static final boolean DEFAULT_ENABLED
public static final boolean DEFAULT_SECURE
public static final boolean DEFAULT_HTTPONLY
public static final java.lang.String DEFAULT_COOKIENAME
public static final java.lang.String DEFAULT_COOKIEPATH
public static final io.micronaut.http.cookie.SameSite DEFAULT_COOKIESAMESITE
public RefreshTokenCookieConfigurationProperties(@Nullable @Property(name="micronaut.security.endpoints.oauth.path") java.lang.String oauthControllerPath)
oauthControllerPath
- The path for the oauth controllerpublic boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic void setCookieName(java.lang.String cookieName)
cookieName
- Cookie name@NonNull public java.lang.String getCookieName()
getCookieName
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.lang.String> getCookieDomain()
getCookieDomain
in interface io.micronaut.http.cookie.CookieConfiguration
@Nullable public java.util.Optional<java.lang.String> getCookiePath()
getCookiePath
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.lang.Boolean> isCookieHttpOnly()
isCookieHttpOnly
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.lang.Boolean> isCookieSecure()
isCookieSecure
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<java.time.temporal.TemporalAmount> getCookieMaxAge()
getCookieMaxAge
in interface io.micronaut.http.cookie.CookieConfiguration
public java.util.Optional<io.micronaut.http.cookie.SameSite> getCookieSameSite()
getCookieSameSite
in interface io.micronaut.http.cookie.CookieConfiguration
public void setCookieDomain(@Nullable java.lang.String cookieDomain)
cookieDomain
- the domain name of this Cookiepublic void setCookiePath(@Nullable java.lang.String cookiePath)
cookiePath
- The path of the cookie.public void setCookieHttpOnly(java.lang.Boolean cookieHttpOnly)
cookieHttpOnly
- Whether the Cookie can only be accessed via HTTPpublic void setCookieSecure(java.lang.Boolean cookieSecure)
cookieSecure
- True if the cookie is securepublic void setCookieMaxAge(java.time.Duration cookieMaxAge)
cookieMaxAge
- The maximum age of the cookiepublic void setCookieSameSite(@Nullable io.micronaut.http.cookie.SameSite cookieSameSite)
cookieSameSite
- The same-site setting of the cookie.