@ConfigurationProperties(value="micronaut.security.session") public class SecuritySessionConfigurationProperties extends 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 String |
DEFAULT_LOGINFAILURETARGETURL
The default login failure target URL.
|
static String |
DEFAULT_LOGINSUCCESSTARGETURL
The default login success target URL.
|
static String |
DEFAULT_LOGOUTTARGETURL
The default login target URL.
|
static String |
PREFIX |
Constructor and Description |
---|
SecuritySessionConfigurationProperties() |
public static final String PREFIX
public static final boolean DEFAULT_ENABLED
public static final String DEFAULT_LOGINSUCCESSTARGETURL
public static final String DEFAULT_LOGINFAILURETARGETURL
public static final 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 Toggleable
public String getLoginSuccessTargetUrl()
getLoginSuccessTargetUrl
in interface SecuritySessionConfiguration
public String getLogoutTargetUrl()
getLogoutTargetUrl
in interface SecuritySessionConfiguration
public String getLoginFailureTargetUrl()
getLoginFailureTargetUrl
in interface SecuritySessionConfiguration
public String getUnauthorizedTargetUrl()
getUnauthorizedTargetUrl
in interface SecuritySessionConfiguration
public String getForbiddenTargetUrl()
getForbiddenTargetUrl
in interface SecuritySessionConfiguration
public void setLoginSuccessTargetUrl(String loginSuccessTargetUrl)
loginSuccessTargetUrl
- The URLpublic void setLoginFailureTargetUrl(String loginFailureTargetUrl)
loginFailureTargetUrl
- The URLpublic void setLogoutTargetUrl(String logoutTargetUrl)
logoutTargetUrl
- The URLpublic void setUnauthorizedTargetUrl(String unauthorizedTargetUrl)
unauthorizedTargetUrl
- The URLpublic void setForbiddenTargetUrl(String forbiddenTargetUrl)
forbiddenTargetUrl
- The URLpublic void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic Optional<String> getUnauthorizedRedirectUri()
public Optional<String> getUnauthorizedRedirectUri(HttpRequest<?> request)
getUnauthorizedRedirectUri
in interface UnauthorizedRejectionUriProvider
request
- HttpRequest
being processedpublic Optional<String> getForbiddenRedirectUri()
public Optional<String> getForbiddenRedirectUri(HttpRequest<?> request)
getForbiddenRedirectUri
in interface ForbiddenRejectionUriProvider
request
- HttpRequest
being processed