Class AndAuthorizer<U extends UserProfile>
- java.lang.Object
-
- org.pac4j.core.authorization.authorizer.AndAuthorizer<U>
-
- Type Parameters:
U
- Type of profile
- All Implemented Interfaces:
Authorizer<U>
public class AndAuthorizer<U extends UserProfile> extends Object implements Authorizer<U>
The conjunction of authorizers.- Since:
- 3.4.0
- Author:
- Sergey Morgunov
-
-
Constructor Summary
Constructors Constructor Description AndAuthorizer(List<Authorizer<U>> authorizers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <U extends UserProfile>
Authorizer<U>and(Authorizer<U>... authorizers)
boolean
isAuthorized(WebContext context, List<U> profiles)
Checks if the user profiles and / or the current web context are authorized.
-
-
-
Constructor Detail
-
AndAuthorizer
public AndAuthorizer(List<Authorizer<U>> authorizers)
-
-
Method Detail
-
isAuthorized
public boolean isAuthorized(WebContext context, List<U> profiles)
Description copied from interface:Authorizer
Checks if the user profiles and / or the current web context are authorized.- Specified by:
isAuthorized
in interfaceAuthorizer<U extends UserProfile>
- Parameters:
context
- the web contextprofiles
- the user profiles- Returns:
- if the access is authorized
-
and
public static <U extends UserProfile> Authorizer<U> and(Authorizer<U>... authorizers)
-
-