Class SimpleRoleMappingProviderImpl
- java.lang.Object
-
- org.glassfish.security.services.provider.authorization.SimpleRoleMappingProviderImpl
-
- All Implemented Interfaces:
RoleMappingProvider
,SecurityProvider
@Service(name="simpleRoleMapping") @PerLookup public class SimpleRoleMappingProviderImpl extends Object implements RoleMappingProvider
-
-
Constructor Summary
Constructors Constructor Description SimpleRoleMappingProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoleMappingService.RoleDeploymentContext
findOrCreateDeploymentContext(String appContext)
Find an existingRoleDeploymentContext
, or create a new one if one does not already exist for the specified application context.void
initialize(SecurityProvider providerConfig)
Initialize the security provider instance with the specific security provider configuration.boolean
isUserInRole(String appContext, AzSubject subject, AzResource resource, String role, AzEnvironment environment, List<AzAttributeResolver> resolvers)
Determine whether the user (AzSubject
) has the indicated role for a given resource (AzResource
) and application context.
-
-
-
Method Detail
-
initialize
public void initialize(SecurityProvider providerConfig)
Description copied from interface:SecurityProvider
Initialize the security provider instance with the specific security provider configuration.- Specified by:
initialize
in interfaceSecurityProvider
-
isUserInRole
public boolean isUserInRole(String appContext, AzSubject subject, AzResource resource, String role, AzEnvironment environment, List<AzAttributeResolver> resolvers)
Description copied from interface:RoleMappingProvider
Determine whether the user (AzSubject
) has the indicated role for a given resource (AzResource
) and application context.- Specified by:
isUserInRole
in interfaceRoleMappingProvider
- Parameters:
appContext
- The application context for the query (can be null).subject
- The targetSubject
.resource
- TheURI
resource for the query.role
- The target role.environment
- The attributes collection representing the environment.resolvers
- The ordered list of attribute resolvers.
-
findOrCreateDeploymentContext
public RoleMappingService.RoleDeploymentContext findOrCreateDeploymentContext(String appContext)
Description copied from interface:RoleMappingProvider
Find an existingRoleDeploymentContext
, or create a new one if one does not already exist for the specified application context.- Specified by:
findOrCreateDeploymentContext
in interfaceRoleMappingProvider
- Parameters:
appContext
- The application context for which theRoleDeploymentContext
is desired.
-
-