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 Details

  • Constructor Details

    • TokenCookieConfigurationProperties

      public TokenCookieConfigurationProperties()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Whether JWT cookie configuration is enabled. Default value (true).
      Specified by:
      isEnabled in interface io.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

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

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

      @Nullable public @Nullable Optional<String> getCookiePath()
      The path of the cookie. Default value ("/").
      Specified by:
      getCookiePath in interface io.micronaut.http.cookie.CookieConfiguration
      Returns:
      The path of the cookie.
    • setCookiePath

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