Package org.infinispan.security.mappers

Class IdentityRoleMapper

  • All Implemented Interfaces:
    PrincipalRoleMapper

    public class IdentityRoleMapper
    extends java.lang.Object
    implements PrincipalRoleMapper
    IdentityRoleMapper. A very simple role which simply returns the principal's name as the role name.
    Since:
    7.0
    Author:
    Tristan Tarrant
    Public API
    • Constructor Detail

      • IdentityRoleMapper

        public IdentityRoleMapper()
    • Method Detail

      • principalToRoles

        public java.util.Set<java.lang.String> principalToRoles​(java.security.Principal principal)
        Description copied from interface: PrincipalRoleMapper
        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.
        Specified by:
        principalToRoles in interface PrincipalRoleMapper
        Returns:
        list of roles the principal belongs to
      • equals

        public boolean equals​(java.lang.Object obj)