Class MappedRoleMapper

  • All Implemented Interfaces:
    RoleMapper

    public class MappedRoleMapper
    extends Object
    implements RoleMapper
    A simple mapping role mapper. Maps each role to a set of new roles using a String to Set map.
    Author:
    Martin Mazanek
    • Field Detail

      • initialized

        private volatile boolean initialized
    • Method Detail

      • initialize

        public void initialize​(Map<String,​String> configuration)
        Custom component method. Called from WildFly core. Used to include mapped role mapping functionality in older WildFly versions.
        Parameters:
        configuration - map of mapping rules where key is delegate role and value is whitespace separated list of new roles
        Throws:
        IllegalStateException - when called mapper is already initialized
      • mapRoles

        public Roles mapRoles​(Roles rolesToMap)
        Description copied from interface: RoleMapper
        Returns a set of strings representing the roles mapped from the given roles in their raw form.
        Specified by:
        mapRoles in interface RoleMapper
        Parameters:
        rolesToMap - the roles in their raw form to apply mapping
        Returns:
        the mapped role set