Interface RoleMappingService

    • Method Detail

      • isUserInRole

        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.
        Parameters:
        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.
        Returns:
        true if the user has the specified role.
        Throws:
        IllegalArgumentException - for a null subject or resource
        IllegalStateException - if the service was not initialized.
      • isUserInRole

        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.
        Parameters:
        appContext - The application context for the query (can be null).
        subject - The target AzSubject.
        resource - The AzResource for the query.
        role - The target role.
        Returns:
        true if the user has the specified role.
        Throws:
        IllegalArgumentException - for a null subject or resource
        IllegalStateException - if the service was not initialized.
      • findOrCreateDeploymentContext

        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. The role deployment context will be returned in an "open" state, and will stay that way until commit() or delete() is called.
        Parameters:
        appContext - The application context for which the RoleDeploymentContext is desired.
        Returns:
        The resulting RoleDeploymentContext or null if the configured providers do not support this feature.
        Throws:
        IllegalStateException - if the service was not initialized.