Class TokenCookieConfigurationProperties
java.lang.Object
io.micronaut.security.token.cookie.AbstractAccessTokenCookieConfigurationProperties
io.micronaut.security.token.cookie.TokenCookieConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,io.micronaut.http.cookie.CookieConfiguration
,TokenCookieConfiguration
,AccessTokenCookieConfiguration
@Requires(classes=io.micronaut.http.cookie.CookieConfiguration.class) @Requires(condition=CookieBasedAuthenticationModeCondition.class) @Requires(property="micronaut.security.token.cookie.enabled",notEquals="false",defaultValue="true")
@ConfigurationProperties("micronaut.security.token.cookie")
public class TokenCookieConfigurationProperties
extends AbstractAccessTokenCookieConfigurationProperties
implements AccessTokenCookieConfiguration
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The default cookie name.static final String
Default Cookie Path.static final boolean
The default enable value.static final String
Fields inherited from class io.micronaut.security.token.cookie.AbstractAccessTokenCookieConfigurationProperties
cookieDomain, cookieHttpOnly, cookieMaxAge, cookieSameSite, cookieSecure, DEFAULT_COOKIESAMESITE, DEFAULT_HTTPONLY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
Cookie Name.The path of the cookie.boolean
Whether JWT cookie configuration is enabled.void
setCookieName
(String cookieName) Cookie Name.void
setCookiePath
(@Nullable String cookiePath) Sets the path of the cookie.void
setEnabled
(boolean enabled) Sets whether JWT cookie configuration is enabled.Methods inherited from class io.micronaut.security.token.cookie.AbstractAccessTokenCookieConfigurationProperties
getCookieDomain, getCookieMaxAge, getCookieSameSite, isCookieHttpOnly, isCookieSecure, setCookieDomain, setCookieHttpOnly, setCookieMaxAge, setCookieSameSite, setCookieSecure
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.cookie.CookieConfiguration
getCookieDomain, getCookieMaxAge, getCookieSameSite, isCookieHttpOnly, isCookieSecure
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
DEFAULT_COOKIENAME
The default cookie name.- See Also:
-
DEFAULT_COOKIEPATH
Default Cookie Path.- See Also:
-
-
Constructor Details
-
TokenCookieConfigurationProperties
public TokenCookieConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Whether JWT cookie configuration is enabled. Default value (true).- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
- Returns:
- a boolean flag indicating whether the JwtCookieTokenReader should be enabled or not
-
setEnabled
public void setEnabled(boolean enabled) Sets whether JWT cookie configuration is enabled. Default value (true).- Parameters:
enabled
- True if it is enabled
-
setCookieName
Cookie Name. Default value ("JWT").- Parameters:
cookieName
- Cookie name
-
getCookieName
Cookie Name. Default value ("JWT").- Specified by:
getCookieName
in interfaceio.micronaut.http.cookie.CookieConfiguration
- Returns:
- a name for the cookie
-
getCookiePath
The path of the cookie. Default value ("/").- Specified by:
getCookiePath
in interfaceio.micronaut.http.cookie.CookieConfiguration
- Returns:
- The path of the cookie.
-
setCookiePath
Sets the path of the cookie. Default value ("/").- Parameters:
cookiePath
- The path of the cookie.
-