Class OrAuthorizer

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

public class OrAuthorizer extends Object implements Authorizer
The disjunction of authorizers.
Since:
3.4.0
Author:
Sergey Morgunov
  • Constructor Details

    • OrAuthorizer

      public OrAuthorizer(List<Authorizer> authorizers)

      Constructor for OrAuthorizer.

      Parameters:
      authorizers - a List object
  • Method Details

    • isAuthorized

      public boolean isAuthorized(WebContext context, SessionStore sessionStore, List<UserProfile> profiles)
      Checks if the user profiles and / or the current web context are authorized.
      Specified by:
      isAuthorized in interface Authorizer
      Parameters:
      context - the web context
      sessionStore - the session store
      profiles - the user profiles
      Returns:
      if the access is authorized
    • or

      public static OrAuthorizer or(Authorizer... authorizers)

      or.

      Parameters:
      authorizers - a Authorizer object
      Returns:
      a OrAuthorizer object