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 Details

  • 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 interface io.micronaut.core.util.Toggleable
      Returns:
      a boolean flag indicating whether the RefreshTokenCookieConfigurationProperties should be enabled or not
    • getCookieName

      @NonNull public @NonNull String getCookieName()
      Specified by:
      getCookieName in interface io.micronaut.http.cookie.CookieConfiguration
      Returns:
      a name for the cookie
    • getCookiePath

      @Nullable public @Nullable Optional<String> getCookiePath()
      Specified by:
      getCookiePath in interface io.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

      public void setCookieName(String cookieName)
      Cookie Name. Default value ("JWT_REFRESH_TOKEN").
      Parameters:
      cookieName - Cookie name
    • setCookiePath

      public void setCookiePath(@Nullable @Nullable String cookiePath)
      Sets the path of the cookie. Default value ("/oauth/access_token").
      Parameters:
      cookiePath - The path of the cookie.