Class IpRegexpAuthorizer

java.lang.Object
org.pac4j.http.authorization.authorizer.IpRegexpAuthorizer
All Implemented Interfaces:
org.pac4j.core.authorization.authorizer.Authorizer

public class IpRegexpAuthorizer extends Object implements org.pac4j.core.authorization.authorizer.Authorizer
Authorizes users based on their IP and a regexp pattern.
Since:
1.8.1
Author:
Jerome Leleu
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

    • IpRegexpAuthorizer

      public IpRegexpAuthorizer()

      Constructor for IpRegexpAuthorizer.

    • IpRegexpAuthorizer

      public IpRegexpAuthorizer(String regexpPattern)

      Constructor for IpRegexpAuthorizer.

      Parameters:
      regexpPattern - a String object
  • Method Details

    • isAuthorized

      public boolean isAuthorized(org.pac4j.core.context.WebContext context, org.pac4j.core.context.session.SessionStore sessionStore, List<org.pac4j.core.profile.UserProfile> profile)
      Specified by:
      isAuthorized in interface org.pac4j.core.authorization.authorizer.Authorizer
    • setRegexpPattern

      public void setRegexpPattern(String regexpPattern)

      setRegexpPattern.

      Parameters:
      regexpPattern - a String object
    • toString

      public String toString()
      Overrides:
      toString in class Object