Package org.infinispan.security
Interface PrincipalRoleMapper
- All Known Subinterfaces:
MutablePrincipalRoleMapper
- All Known Implementing Classes:
ClusterRoleMapper
,ClusterRoleMapper
,CommonNameRoleMapper
,CommonNameRoleMapper
,IdentityRoleMapper
,IdentityRoleMapper
public interface PrincipalRoleMapper
PrincipalRoleMapper.
- Since:
- 7.0
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptionprincipalToRoles
(Principal principal) Maps a principal name to a set of role names.default void
setContext
(PrincipalRoleMapperContext context) Sets the context for thisPrincipalRoleMapper
-
Method Details
-
principalToRoles
Maps a principal name to a set of role names. The principal name depends on the source of the principal itself. For example, in LDAP a Principal might use the Distinguished Name format (DN). The mapper should return null if it does not recognize the principal.- Parameters:
principal
-- Returns:
- list of roles the principal belongs to
-
setContext
Sets the context for thisPrincipalRoleMapper
- Parameters:
context
-
-