Class IpPatternsRule

java.lang.Object
io.micronaut.security.rules.AbstractSecurityRule<io.micronaut.http.HttpRequest<?>>
io.micronaut.security.rules.IpPatternsRule
All Implemented Interfaces:
io.micronaut.core.order.Ordered, SecurityRule<io.micronaut.http.HttpRequest<?>>

@Requires(classes=io.micronaut.http.HttpRequest.class) @Singleton public class IpPatternsRule extends AbstractSecurityRule<io.micronaut.http.HttpRequest<?>>
A security rule implementation backed by the SecurityConfigurationProperties.getIpPatterns() ()}.
Since:
1.0
Author:
Sergio del Amo
  • Field Details

    • ORDER

      public static final Integer ORDER
      The order of the rule.
  • Constructor Details

    • IpPatternsRule

      public IpPatternsRule(RolesFinder rolesFinder, SecurityConfiguration securityConfiguration)
      Parameters:
      rolesFinder - Roles Parser
      securityConfiguration - Security Configuration
  • Method Details

    • getOrder

      public int getOrder()
    • check

      public org.reactivestreams.Publisher<SecurityRuleResult> check(io.micronaut.http.HttpRequest<?> request, @Nullable @Nullable Authentication authentication)
      Description copied from interface: SecurityRule
      Returns a publisher that is required to emit a single security result based on any conditions.
      Parameters:
      request - The current request
      authentication - The user authentication. Null if not authenticated
      Returns:
      The result
      See Also: