Package io.dropwizard.auth
Interface Authorizer<P extends Principal>
-
- Type Parameters:
P
- the type of principals
- All Known Implementing Classes:
CachingAuthorizer
,ExampleAuthorizer
,PermitAllAuthorizer
public interface Authorizer<P extends Principal>
An interface for classes which authorize principal objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description boolean
authorize(P principal, String role)
Deprecated.default boolean
authorize(P principal, String role, javax.ws.rs.container.ContainerRequestContext requestContext)
Decides if access is granted for the given principal in the given role.
-
-
-
Method Detail
-
authorize
@Deprecated boolean authorize(P principal, String role)
Deprecated.Decides if access is granted for the given principal in the given role.- Parameters:
principal
- aPrincipal
object, representing a userrole
- a user role- Returns:
true
, if the access is granted,false otherwise
-
authorize
default boolean authorize(P principal, String role, @Nullable javax.ws.rs.container.ContainerRequestContext requestContext)
Decides if access is granted for the given principal in the given role.- Parameters:
principal
- aPrincipal
object, representing a userrole
- a user rolerequestContext
- a request context.- Returns:
true
, if the access is granted,false otherwise
- Since:
- 2.0
-
-