@ConfigurationProperties(value="micronaut.security") public class SecurityConfigurationProperties extends java.lang.Object implements SecurityConfiguration
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANYWHERE |
static AuthenticationStrategy |
DEFAULT_AUTHENTICATION_STRATEGY
The default enable value.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static boolean |
DEFAULT_REJECT_NOT_FOUND |
static java.lang.String |
PREFIX |
| Constructor and Description |
|---|
SecurityConfigurationProperties() |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationMode |
getAuthentication() |
AuthenticationStrategy |
getAuthenticationProviderStrategy() |
java.util.List<InterceptUrlMapPattern> |
getInterceptUrlMap() |
java.util.List<java.lang.String> |
getIpPatterns() |
boolean |
isEnabled() |
boolean |
isRejectNotFound()
For cases where no security rule handles a request and it is determined
that the request does not match any routes on the server, whether the response
should be to reject the request or allow the not found response to be returned.
|
void |
setAuthentication(AuthenticationMode authentication)
Defines which authentication to use.
|
void |
setAuthenticationProviderStrategy(AuthenticationStrategy authenticationProviderStrategy)
Determines how authentication providers should be processed.
|
void |
setEnabled(boolean enabled)
If Security is enabled.
|
void |
setInterceptUrlMap(java.util.List<InterceptUrlMapPattern> interceptUrlMap)
Map that defines the interception patterns.
|
void |
setIpPatterns(java.util.List<java.lang.String> ipPatterns)
Allowed IP patterns.
|
void |
setRejectNotFound(boolean rejectNotFound) |
public static final java.lang.String PREFIX
public static final java.lang.String ANYWHERE
public static final boolean DEFAULT_ENABLED
public static final AuthenticationStrategy DEFAULT_AUTHENTICATION_STRATEGY
public static final boolean DEFAULT_REJECT_NOT_FOUND
@Nullable public AuthenticationMode getAuthentication()
getAuthentication in interface AuthenticationModeConfigurationpublic void setAuthentication(@Nullable
AuthenticationMode authentication)
authentication - Login Handler Modepublic boolean isEnabled()
isEnabled in interface io.micronaut.core.util.Toggleablepublic java.util.List<InterceptUrlMapPattern> getInterceptUrlMap()
getInterceptUrlMap in interface SecurityConfigurationInterceptUrlMapPatternpublic java.util.List<java.lang.String> getIpPatterns()
getIpPatterns in interface SecurityConfigurationpublic void setEnabled(boolean enabled)
enabled - True if security is enabledpublic void setInterceptUrlMap(java.util.List<InterceptUrlMapPattern> interceptUrlMap)
interceptUrlMap - The intercept urls mapspublic void setIpPatterns(java.util.List<java.lang.String> ipPatterns)
ipPatterns - The IP patternspublic AuthenticationStrategy getAuthenticationProviderStrategy()
getAuthenticationProviderStrategy in interface SecurityConfigurationpublic void setAuthenticationProviderStrategy(AuthenticationStrategy authenticationProviderStrategy)
authenticationProviderStrategy - authentication strategy.public boolean isRejectNotFound()
SecurityConfigurationisRejectNotFound in interface SecurityConfigurationpublic void setRejectNotFound(boolean rejectNotFound)
rejectNotFound - Set to true if the server should respond with 404 for requests that do not
* match any routes on the server. Default value ({#DEFAULT_REJECT_NOT_FOUND}).