P - the type of principalspublic interface Authorizer<P extends Principal>
| Modifier and Type | Method and 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.
|
default AuthorizationContext<P> |
getAuthorizationContext(P principal,
String role,
javax.ws.rs.container.ContainerRequestContext requestContext)
Returns an
AuthorizationContext object, to be used in CachingAuthorizer as cache key. |
@Deprecated boolean authorize(P principal, String role)
authorize(Principal, String, ContainerRequestContext) insteadprincipal - a Principal object, representing a userrole - a user roletrue, if the access is granted, false otherwisedefault boolean authorize(P principal, String role, @Nullable javax.ws.rs.container.ContainerRequestContext requestContext)
principal - a Principal object, representing a userrole - a user rolerequestContext - a request context.true, if the access is granted, false otherwisedefault AuthorizationContext<P> getAuthorizationContext(P principal, String role, @Nullable javax.ws.rs.container.ContainerRequestContext requestContext)
AuthorizationContext object, to be used in CachingAuthorizer as cache key.principal - a Principal object, representing a userrole - a user rolerequestContext - a request context.AuthorizationContext object, to be used in CachingAuthorizer.Copyright © 2011. All rights reserved.