@Contract public interface RoleMappingService extends SecurityService
RoleMappingService
provides functions that determine a user's role.Modifier and Type | Interface and Description |
---|---|
static interface |
RoleMappingService.RoleDeploymentContext
This interface represents a
RoleDeploymentContext as returned by the Role Mapping
Service's findOrCreateDeploymentContext() method. |
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. |
boolean |
isUserInRole(String appContext,
AzSubject subject,
AzResource resource,
String role)
Determine whether the user (
AzSubject ) has the indicated role
for a given resource (AzResource ) and application context. |
boolean |
isUserInRole(String appContext,
Subject subject,
URI resource,
String role)
Determine whether the user (
Subject ) has the indicated role
for a given resource (URI ) and application context. |
initialize
boolean isUserInRole(String appContext, Subject subject, URI resource, String role)
Subject
) has the indicated role
for a given resource (URI
) and application context.appContext
- The application context for the query (can be null).subject
- The target Subject
.resource
- The URI
resource for the query.role
- The target role.IllegalArgumentException
- for a null
subject or resourceIllegalStateException
- if the service was not initialized.boolean isUserInRole(String appContext, AzSubject subject, AzResource resource, String role)
AzSubject
) has the indicated role
for a given resource (AzResource
) and application context.appContext
- The application context for the query (can be null).subject
- The target AzSubject
.resource
- The AzResource
for the query.role
- The target role.IllegalArgumentException
- for a null
subject or resourceIllegalStateException
- if the service was not initialized.RoleMappingService.RoleDeploymentContext findOrCreateDeploymentContext(String appContext)
RoleDeploymentContext
, or create a new one if one does not
already exist for the specified application context. The role deployment context will be
returned in an "open" state, and will stay that way until commit() or delete() is called.appContext
- The application context for which the RoleDeploymentContext
is desired.RoleDeploymentContext
or null
if the configured providers
do not support this feature.IllegalStateException
- if the service was not initialized.Copyright © 2018. All rights reserved.