Class RefreshTokenCookieConfigurationProperties
java.lang.Object
io.micronaut.security.token.cookie.AbstractAccessTokenCookieConfigurationProperties
io.micronaut.security.token.cookie.RefreshTokenCookieConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,io.micronaut.http.cookie.CookieConfiguration
,TokenCookieConfiguration
,RefreshTokenCookieConfiguration
@Requires(classes=io.micronaut.http.cookie.CookieConfiguration.class) @Requires(condition=CookieBasedAuthenticationModeCondition.class) @Requires(property="micronaut.security.token.refresh.cookie.enabled",notEquals="false",defaultValue="true")
@ConfigurationProperties("micronaut.security.token.refresh.cookie")
@Secondary
public class RefreshTokenCookieConfigurationProperties
extends AbstractAccessTokenCookieConfigurationProperties
implements RefreshTokenCookieConfiguration
- 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
ConstructorDescriptionRefreshTokenCookieConfigurationProperties
(@Nullable String oauthControllerPath) -
Method Summary
Modifier and TypeMethodDescription@NonNull String
boolean
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
-
RefreshTokenCookieConfigurationProperties
public RefreshTokenCookieConfigurationProperties(@Nullable @Property(name="micronaut.security.endpoints.oauth.path") @Nullable String oauthControllerPath) - Parameters:
oauthControllerPath
- The path for the oauth controller
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
- Returns:
- a boolean flag indicating whether the RefreshTokenCookieConfigurationProperties should be enabled or not
-
getCookieName
- Specified by:
getCookieName
in interfaceio.micronaut.http.cookie.CookieConfiguration
- Returns:
- a name for the cookie
-
getCookiePath
- Specified by:
getCookiePath
in interfaceio.micronaut.http.cookie.CookieConfiguration
- Returns:
- The path of the cookie.
-
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_REFRESH_TOKEN").- Parameters:
cookieName
- Cookie name
-
setCookiePath
Sets the path of the cookie. Default value ("/oauth/access_token").- Parameters:
cookiePath
- The path of the cookie.
-