public interface PrivilegeService
Restriction,
RestrictedRole, and RestrictedPermission.
These functions are most useful for consolidation purposes to obtain user's
flat permissions, flat roles
restrictions, restricted roles,
restricted permissions,
AuthorizationServer.getDefaultUserPermissions(), and
AuthorizationServer.getDefaultUserRoles() for building JWT claims.
| Modifier and Type | Method and Description |
|---|---|
Map<String,Set<String>> |
getRestrictionTargetsByRestrictionType(@NonNull Set<Restriction> restrictions)
Converts the Set of
Restriction to a Map with the structure of: {restrictionType:
[restrictionTargets]}. |
PrivilegeSummary |
getUserPrivilegeSummary(@NonNull User user,
@NonNull String serverId)
Gets a
PrivilegeSummary of user's consolidated authorities, restrictions, and
restricted authorities. |
PrivilegeSummary getUserPrivilegeSummary(@NonNull @NonNull User user, @NonNull @NonNull String serverId)
PrivilegeSummary of user's consolidated authorities, restrictions, and
restricted authorities.user - User to get the PrivilegeSummary forserverId - id of the AuthorizationServerPrivilegeSummary of user's authorities, restrictions, and restricted
authoritiesPrivilegeSummaryMap<String,Set<String>> getRestrictionTargetsByRestrictionType(@NonNull @NonNull Set<Restriction> restrictions)
Restriction to a Map with the structure of: {restrictionType:
[restrictionTargets]}.restrictions - Set of RestrictionCopyright © 2021. All rights reserved.