Class AndAuthorizer

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

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

    • AndAuthorizer

      public AndAuthorizer(List<Authorizer> authorizers)

      Constructor for AndAuthorizer.

      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
    • and

      public static Authorizer and(Authorizer... authorizers)

      and.

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