Class MappedRoleMapper

  • All Implemented Interfaces:

    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.
    Martin Mazanek
    • Constructor Detail

      • MappedRoleMapper

        public MappedRoleMapper()
        Construct a new instance. Called from WildFly core when using this as a custom component. You should not use this constructor and use MappedRoleMapper.Builder instead. You must call initialize(Map) to configure mapping map before usage.
        See Also:
    • 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.
        configuration - map of mapping rules where key is delegate role and value is whitespace separated list of new roles
        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
        rolesToMap - the roles in their raw form to apply mapping
        the mapped role set