@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 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 |
---|---|
AuthenticationStrategy |
getAuthenticationStrategy() |
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 |
setAuthenticationStrategy(AuthenticationStrategy authenticationStrategy) |
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 boolean DEFAULT_REJECT_NOT_FOUND
public boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable
public java.util.List<InterceptUrlMapPattern> getInterceptUrlMap()
getInterceptUrlMap
in interface SecurityConfiguration
InterceptUrlMapPattern
public java.util.List<java.lang.String> getIpPatterns()
getIpPatterns
in interface SecurityConfiguration
public 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 getAuthenticationStrategy()
getAuthenticationStrategy
in interface SecurityConfiguration
public void setAuthenticationStrategy(AuthenticationStrategy authenticationStrategy)
authenticationStrategy
- Determines how authentication providers should be processed.
Default value (AuthenticationStrategy.ANY
).public boolean isRejectNotFound()
SecurityConfiguration
isRejectNotFound
in interface SecurityConfiguration
public 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}).