@FunctionalInterface public interface AuthorizationProvider extends SecurityProvider
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<AuthorizationResponse> |
authorize(ProviderRequest context)
Authorize a request based on configuration.
|
default boolean |
isUserInRole(Subject subject,
String role)
Return true if current user is in the specified role.
|
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjectsCompletionStage<AuthorizationResponse> authorize(ProviderRequest context)
context - context of this security enforcement/validationAuthorizationResponse.permit()default boolean isUserInRole(Subject subject, String role)
Role grant 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 subjectrole - role nameCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.