Class UserRealmRoleMappingMapper

    • Constructor Detail

      • UserRealmRoleMappingMapper

        public UserRealmRoleMappingMapper()
    • Method Detail

      • getId

        public String getId()
      • getDisplayType

        public String getDisplayType()
      • getDisplayCategory

        public String getDisplayCategory()
      • getHelpText

        public String getHelpText()
      • getPriority

        public int getPriority()
        Description copied from interface: ProtocolMapper
        Priority of this protocolMapper implementation. Lower goes first.
        Specified by:
        getPriority in interface ProtocolMapper
        Returns:
      • setClaim

        protected static void setClaim​(IDToken token,
                                       ProtocolMapperModel mappingModel,
                                       Set<String> rolesToAdd,
                                       String clientId,
                                       String prefix)
        Retrieves all roles of the current user based on direct roles set to the user, its groups and their parent groups. Then it recursively expands all composite roles, and restricts according to the given predicate restriction. If the current client sessions is restricted (i.e. no client found in active user session has full scope allowed), the final list of roles is also restricted by the client scope. Finally, the list is mapped to the token into a claim.
        Parameters:
        token -
        mappingModel -
        rolesToAdd -
        clientId -
        prefix -