@Service(name="simpleAuthorization") @PerLookup public class SimpleAuthorizationProviderImpl extends Object implements AuthorizationProvider
Modifier and Type | Class and Description |
---|---|
protected class |
SimpleAuthorizationProviderImpl.Decider
Chooses what authorization decision to render.
|
Constructor and Description |
---|
SimpleAuthorizationProviderImpl() |
Modifier and Type | Method and Description |
---|---|
protected SimpleAuthorizationProviderImpl.Decider |
createDecider() |
AuthorizationService.PolicyDeploymentContext |
findOrCreateDeploymentContext(String appContext)
Finds an existing PolicyDeploymentContext, or create a new one if one does not
already exist for the specified appContext.
|
AzResult |
getAuthorizationDecision(AzSubject subject,
AzResource resource,
AzAction action,
AzEnvironment environment,
List<AzAttributeResolver> attributeResolvers)
Evaluates the specified subject, resource, action, and environment against the body of
policy managed by this provider and returns an access control result.
|
void |
initialize(SecurityProvider providerConfig)
Initialize the security provider instance with the specific security provider configuration.
|
public void initialize(SecurityProvider providerConfig)
SecurityProvider
initialize
in interface SecurityProvider
protected SimpleAuthorizationProviderImpl.Decider createDecider()
public AzResult getAuthorizationDecision(AzSubject subject, AzResource resource, AzAction action, AzEnvironment environment, List<AzAttributeResolver> attributeResolvers)
AuthorizationProvider
getAuthorizationDecision
in interface AuthorizationProvider
subject
- The attributes collection representing the Subject for which an authorization
decision is requested.resource
- The attributes collection representing the resource for which access is
being requested.action
- The attributes collection representing the action, with respect to the resource,
for which access is being requested. A null action is interpreted as all
actions, however all actions may also be represented by the AzAction instance.
See AzAction
.environment
- The attributes collection representing the environment, or context,
in which the access decision is being requested, null if none.attributeResolvers
- The ordered list of attribute resolvers, for
run time determination of missing attributes, null if none.AuthorizationService.getAuthorizationDecision(org.glassfish.security.services.api.authorization.AzSubject, org.glassfish.security.services.api.authorization.AzResource, org.glassfish.security.services.api.authorization.AzAction)
public AuthorizationService.PolicyDeploymentContext findOrCreateDeploymentContext(String appContext)
AuthorizationProvider
findOrCreateDeploymentContext
in interface AuthorizationProvider
appContext
- The application context for which the PolicyDeploymentContext
is desired.AuthorizationService.findOrCreateDeploymentContext(String)
Copyright © 2019. All rights reserved.