Package io.micronaut.security.config
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 java.lang.Object implements ForbiddenRedirectConfigurationForbidden redirect configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ENABLEDThe default enabled value for forbidden.static java.lang.StringDEFAULT_FORBIDDENThe default forbidden rejection target URL.
-
Constructor Summary
Constructors Constructor Description ForbiddenRedirectConfigurationProperties()
-
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 forbidden rejections.voidsetUrl(java.lang.String url)Where the user is redirected to after trying to access a secured route which he is forbidden to access.
-
-
-
Field Detail
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLED
The default enabled value for forbidden.- See Also:
- Constant Field Values
-
DEFAULT_FORBIDDEN
public static final java.lang.String DEFAULT_FORBIDDEN
The default forbidden rejection target URL.- See Also:
- Constant Field Values
-
-
Method Detail
-
getUrl
@NonNull public java.lang.String getUrl()
- Specified by:
getUrlin interfaceForbiddenRedirectConfiguration
-
setUrl
public void setUrl(@NonNull java.lang.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:
isEnabledin interfaceio.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
-
-