- All Superinterfaces:
- All Known Implementing Classes:
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AuthorizationProvider extends SecurityProviderAuthorization security provider. Validates the request and decides whether it should continue processing.
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
authorize(ProviderRequest context)Authorize a request based on configuration.
isUserInRole(Subject subject, String role)Return true if current user is in the specified role.
CompletionStage<AuthorizationResponse> authorize(ProviderRequest context)Authorize a request based on configuration. Authorization cannot be optional. If this method is called, it should always attempt to authorize the current request. This method will be invoked for inbound requests ONLY.
context- context of this security enforcement/validation
- response that either permits, denies or abstains from decision
- See Also:
isUserInRoleReturn true if current user is in the specified role. Only providers that support role based access should implement this method. For others it checks the subject for the presence of
Rolegrant of the specified name. This method is defined to conform with one of the most commonly spread authorization concept, as it is required for frameworks such as Servlet and JAX-RS.
subject- current subject
role- role name
- true if current user is in this role