@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
The default reject-not-found value.
|
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 AuthenticationModeConfiguration
public void setAuthentication(@Nullable AuthenticationMode authentication)
authentication
- Login Handler Modepublic 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 getAuthenticationProviderStrategy()
getAuthenticationProviderStrategy
in interface SecurityConfiguration
public void setAuthenticationProviderStrategy(AuthenticationStrategy authenticationProviderStrategy)
authenticationProviderStrategy
- authentication strategy.public boolean isRejectNotFound()
SecurityConfiguration
isRejectNotFound
in interface SecurityConfiguration
public void setRejectNotFound(boolean rejectNotFound)
rejectNotFound
- Whether the server should respond with 401 for requests that do not match any routes on the server, if you set it to false, it will return 404 for requests that do not match any routes on the server. Default value (true).