Package io.micronaut.security.config
Class RedirectConfigurationProperties.UnauthorizedRedirectConfigurationProperties
- java.lang.Object
-
- io.micronaut.security.config.RedirectConfigurationProperties.UnauthorizedRedirectConfigurationProperties
-
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,UnauthorizedRedirectConfiguration
- Enclosing class:
- RedirectConfigurationProperties
@ConfigurationProperties("unauthorized") public static class RedirectConfigurationProperties.UnauthorizedRedirectConfigurationProperties extends java.lang.Object implements UnauthorizedRedirectConfigurationUnauthorized redirect configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ENABLEDThe default enabled value for unauthorized.static java.lang.StringDEFAULT_UNAUTHORIZEDThe default unauthorized rejection target URL.
-
Constructor Summary
Constructors Constructor Description UnauthorizedRedirectConfigurationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetUrl()booleanisEnabled()voidsetEnabled(boolean enabled)Whether it should redirect on unauthorized rejections.voidsetUrl(java.lang.String url)Where the user is redirected to after trying to access a secured route.
-
-
-
Field Detail
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
The default enabled value for unauthorized.- See Also:
- Constant Field Values
-
DEFAULT_UNAUTHORIZED
public static final java.lang.String DEFAULT_UNAUTHORIZED
The default unauthorized rejection target URL.- See Also:
- Constant Field Values
-
-
Method Detail
-
getUrl
@NonNull public java.lang.String getUrl()
- Specified by:
getUrlin interfaceUnauthorizedRedirectConfiguration
-
setUrl
public void setUrl(@NonNull java.lang.String url)Where the user is redirected to after trying to access a secured route. Default value ("/").- Parameters:
url- The URL
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled)
Whether it should redirect on unauthorized rejections. Default value (true).- Parameters:
enabled- The enabled flag
-
-