Class OrAuthorizer<U extends UserProfile>
- java.lang.Object
-
- org.pac4j.core.authorization.authorizer.OrAuthorizer<U>
-
- Type Parameters:
U
- Type of profile
- All Implemented Interfaces:
Authorizer<U>
public class OrAuthorizer<U extends UserProfile> extends Object implements Authorizer<U>
The disjunction of authorizers.- Since:
- 3.4.0
- Author:
- Sergey Morgunov
-
-
Constructor Summary
Constructors Constructor Description OrAuthorizer(List<Authorizer<U>> authorizers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAuthorized(WebContext context, List<U> profiles)
Checks if the user profiles and / or the current web context are authorized.static <U extends UserProfile>
OrAuthorizer<U>or(Authorizer<U>... authorizers)
-
-
-
Constructor Detail
-
OrAuthorizer
public OrAuthorizer(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
-
or
public static <U extends UserProfile> OrAuthorizer<U> or(Authorizer<U>... authorizers)
-
-