Package io.micronaut.security.rules
Class IpPatternsRule
- java.lang.Object
-
- io.micronaut.security.rules.AbstractSecurityRule
-
- io.micronaut.security.rules.IpPatternsRule
-
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,SecurityRule
@Singleton public class IpPatternsRule extends AbstractSecurityRule
A security rule implementation backed by theSecurityConfigurationProperties.getIpPatterns()()}.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.IntegerORDERThe order of the rule.-
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Fields inherited from interface io.micronaut.security.rules.SecurityRule
DENY_ALL, IS_ANONYMOUS, IS_AUTHENTICATED
-
-
Constructor Summary
Constructors Constructor Description IpPatternsRule(RolesFinder rolesFinder, SecurityConfiguration securityConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactivestreams.Publisher<SecurityRuleResult>check(io.micronaut.http.HttpRequest<?> request, io.micronaut.web.router.RouteMatch<?> routeMatch, Authentication authentication)Returns a publisher that is required to emit a single security result based on any conditions.intgetOrder()-
Methods inherited from class io.micronaut.security.rules.AbstractSecurityRule
compareRoles, getRoles
-
-
-
-
Constructor Detail
-
IpPatternsRule
@Inject public IpPatternsRule(RolesFinder rolesFinder, SecurityConfiguration securityConfiguration)
- Parameters:
rolesFinder- Roles ParsersecurityConfiguration- Security Configuration
-
-
Method Detail
-
getOrder
public int getOrder()
-
check
public org.reactivestreams.Publisher<SecurityRuleResult> check(io.micronaut.http.HttpRequest<?> request, @Nullable io.micronaut.web.router.RouteMatch<?> routeMatch, @Nullable Authentication authentication)
Description copied from interface:SecurityRuleReturns a publisher that is required to emit a single security result based on any conditions.- Parameters:
request- The current requestrouteMatch- The matched route or empty if no route was matched. e.g. static resource.authentication- The user authentication. Null if not authenticated- Returns:
- The result
- See Also:
SecurityRuleResult
-
-