Class RedirectConfigurationProperties.ForbiddenRedirectConfigurationProperties

java.lang.Object
io.micronaut.security.config.RedirectConfigurationProperties.ForbiddenRedirectConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, ForbiddenRedirectConfiguration
Enclosing class:
RedirectConfigurationProperties

@ConfigurationProperties("forbidden") public static class RedirectConfigurationProperties.ForbiddenRedirectConfigurationProperties extends Object implements ForbiddenRedirectConfiguration
Forbidden redirect configuration.
  • Field Details

    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enabled value for forbidden.
      See Also:
    • DEFAULT_FORBIDDEN

      public static final String DEFAULT_FORBIDDEN
      The default forbidden rejection target URL.
      See Also:
  • Constructor Details

    • ForbiddenRedirectConfigurationProperties

      public ForbiddenRedirectConfigurationProperties()
  • Method Details

    • getUrl

      @NonNull public @NonNull String getUrl()
      Specified by:
      getUrl in interface ForbiddenRedirectConfiguration
    • setUrl

      public void setUrl(@NonNull @NonNull String url)
      Where the user is redirected to after trying to access a secured route which he is forbidden to access. Default value ("/").
      Parameters:
      url - The URL
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Whether it should redirect on forbidden rejections. Default value (true).
      Parameters:
      enabled - The enabled flag