@ConfigurationProperties(value="micronaut.security.session") public class SecuritySessionConfigurationProperties extends java.lang.Object implements SecuritySessionConfiguration, UnauthorizedRejectionUriProvider, ForbiddenRejectionUriProvider
SecuritySessionConfiguration
. Session-based Authentication configuration properties.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static boolean |
DEFAULT_LEGACYREJECTIONHANDLER
Deprecated.
|
static java.lang.String |
DEFAULT_LOGINFAILURETARGETURL
The default login failure target URL.
|
static java.lang.String |
DEFAULT_LOGINSUCCESSTARGETURL
The default login success target URL.
|
static java.lang.String |
DEFAULT_LOGOUTTARGETURL
The default login target URL.
|
static java.lang.String |
PREFIX |
Constructor and Description |
---|
SecuritySessionConfigurationProperties() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.String> |
getForbiddenRedirectUri() |
java.util.Optional<java.lang.String> |
getForbiddenRedirectUri(io.micronaut.http.HttpRequest<?> request) |
java.lang.String |
getForbiddenTargetUrl() |
java.lang.String |
getLoginFailureTargetUrl() |
java.lang.String |
getLoginSuccessTargetUrl() |
java.lang.String |
getLogoutTargetUrl() |
java.util.Optional<java.lang.String> |
getUnauthorizedRedirectUri() |
java.util.Optional<java.lang.String> |
getUnauthorizedRedirectUri(io.micronaut.http.HttpRequest<?> request) |
java.lang.String |
getUnauthorizedTargetUrl() |
boolean |
isEnabled() |
boolean |
isLegacyRejectionHandler() |
void |
setEnabled(boolean enabled)
Sets whether the session config is enabled.
|
void |
setForbiddenTargetUrl(java.lang.String forbiddenTargetUrl)
Sets the forbidden target URL.
|
void |
setLegacyRejectionHandler(boolean legacyRejectionHandler)
Decides whether the deprecated
SessionSecurityFilterOrderProvider is loaded, instead of the new RedirectRejectionHandler . |
void |
setLoginFailureTargetUrl(java.lang.String loginFailureTargetUrl)
Sets the login failure target URL.
|
void |
setLoginSuccessTargetUrl(java.lang.String loginSuccessTargetUrl)
Sets the login success target URL.
|
void |
setLogoutTargetUrl(java.lang.String logoutTargetUrl)
Sets the logout target URL.
|
void |
setUnauthorizedTargetUrl(java.lang.String unauthorizedTargetUrl)
Sets the unauthorized target URL.
|
public static final java.lang.String PREFIX
public static final boolean DEFAULT_ENABLED
public static final java.lang.String DEFAULT_LOGINSUCCESSTARGETURL
public static final java.lang.String DEFAULT_LOGINFAILURETARGETURL
public static final java.lang.String DEFAULT_LOGOUTTARGETURL
@Deprecated public static final boolean DEFAULT_LEGACYREJECTIONHANDLER
public SecuritySessionConfigurationProperties()
public boolean isLegacyRejectionHandler()
isLegacyRejectionHandler
in interface SecuritySessionConfiguration
SessionSecurityFilterOrderProvider
is loaded, instead of the new RedirectRejectionHandler
public void setLegacyRejectionHandler(boolean legacyRejectionHandler)
SessionSecurityFilterOrderProvider
is loaded, instead of the new RedirectRejectionHandler
. Defaults to (true).legacyRejectionHandler
- whether the deprecated SessionSecurityFilterOrderProvider
is loadedpublic boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public java.lang.String getLoginSuccessTargetUrl()
getLoginSuccessTargetUrl
in interface SecuritySessionConfiguration
public java.lang.String getLogoutTargetUrl()
getLogoutTargetUrl
in interface SecuritySessionConfiguration
public java.lang.String getLoginFailureTargetUrl()
getLoginFailureTargetUrl
in interface SecuritySessionConfiguration
public java.lang.String getUnauthorizedTargetUrl()
getUnauthorizedTargetUrl
in interface SecuritySessionConfiguration
public java.lang.String getForbiddenTargetUrl()
getForbiddenTargetUrl
in interface SecuritySessionConfiguration
public void setLoginSuccessTargetUrl(java.lang.String loginSuccessTargetUrl)
loginSuccessTargetUrl
- The URLpublic void setLoginFailureTargetUrl(java.lang.String loginFailureTargetUrl)
loginFailureTargetUrl
- The URLpublic void setLogoutTargetUrl(java.lang.String logoutTargetUrl)
logoutTargetUrl
- The URLpublic void setUnauthorizedTargetUrl(java.lang.String unauthorizedTargetUrl)
unauthorizedTargetUrl
- The URLpublic void setForbiddenTargetUrl(java.lang.String forbiddenTargetUrl)
forbiddenTargetUrl
- The URLpublic void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic java.util.Optional<java.lang.String> getUnauthorizedRedirectUri()
public java.util.Optional<java.lang.String> getUnauthorizedRedirectUri(io.micronaut.http.HttpRequest<?> request)
getUnauthorizedRedirectUri
in interface UnauthorizedRejectionUriProvider
request
- HttpRequest
being processedpublic java.util.Optional<java.lang.String> getForbiddenRedirectUri()
public java.util.Optional<java.lang.String> getForbiddenRedirectUri(io.micronaut.http.HttpRequest<?> request)
getForbiddenRedirectUri
in interface ForbiddenRejectionUriProvider
request
- HttpRequest
being processed