@Service @Singleton public final class RoleMappingServiceImpl extends Object implements RoleMappingService, org.glassfish.hk2.api.PostConstruct
RoleMappingServiceImpl implements
RoleMappingService
by delegating role mapping decisions to configured
org.glassfish.security.services.spi.RoleMappingProvider
instances.RoleMappingService.RoleDeploymentContext| Constructor and Description |
|---|
RoleMappingServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
RoleMappingService.RoleDeploymentContext |
findOrCreateDeploymentContext(String appContext)
Find an existing
RoleDeploymentContext, or create a new one if one does not
already exist for the specified application context. |
void |
initialize(SecurityConfiguration securityServiceConfiguration)
Initialize the Role Mapping service with the configured role mapping provider.
|
boolean |
isUserInRole(String appContext,
AzSubject subject,
AzResource resource,
String role)
Determine if the user's is in the specified role.
|
boolean |
isUserInRole(String appContext,
Subject subject,
URI resource,
String role)
Determine the user's role by converting arguments into security authorization data types.
|
void |
postConstruct()
Handle lookup of role mapping service configuration and initialization.
|
public void initialize(SecurityConfiguration securityServiceConfiguration)
initialize in interface SecurityServicepublic boolean isUserInRole(String appContext, Subject subject, URI resource, String role)
isUserInRole in interface RoleMappingServiceappContext - The application context for the query (can be null).subject - The target Subject.resource - The URI resource for the query.role - The target role.{@link org.glassfish.security.services.api.authorization.RoleMappingService}public boolean isUserInRole(String appContext, AzSubject subject, AzResource resource, String role)
isUserInRole in interface RoleMappingServiceappContext - The application context for the query (can be null).subject - The target AzSubject.resource - The AzResource for the query.role - The target role.{@link org.glassfish.security.services.api.authorization.RoleMappingService}public RoleMappingService.RoleDeploymentContext findOrCreateDeploymentContext(String appContext)
RoleDeploymentContext, or create a new one if one does not
already exist for the specified application context.findOrCreateDeploymentContext in interface RoleMappingServiceappContext - The application context for which the RoleDeploymentContext is desired.RoleDeploymentContext or null if the configured providers
do not support this feature.{@link org.glassfish.security.services.api.authorization.RoleMappingService}public void postConstruct()
postConstruct in interface org.glassfish.hk2.api.PostConstructCopyright © 2019. All rights reserved.