Interface SubjectAttributesCollector

  • All Known Implementing Classes:
    OpenSSOSubjectAttributesCollector

    public interface SubjectAttributesCollector
    Interface class for obtaining attributes for users. Implementations of this class would be called during authorization to obtain users' attributes and memberships.
    • Method Detail

      • init

        void init​(String realm,
                  Map<String,​Set<String>> configMap)
        Initializes this object with specified parameters.
        Parameters:
        realm - the realm
        configMap - configuration map
      • getAttributes

        Map<String,​Set<String>> getAttributes​(Subject subject,
                                                    Set<String> attrNames)
                                             throws EntitlementException
        Returns the attribute values of the given user represented by Subject object.
        Parameters:
        subject - identity of the user
        attrNames - requested attribute names
        Returns:
        a map of attribute names and their values
        Throws:
        EntitlementException - if this operation failed.
      • getAvailableSubjectAttributeNames

        Set<String> getAvailableSubjectAttributeNames()
                                               throws EntitlementException
        Returns available subject attribute names.
        Returns:
        a set of available subject attribute names or empty CaseInsensitiveHashSet if not found
        Throws:
        EntitlementException
      • isGroupMembershipSearchIndexEnabled

        boolean isGroupMembershipSearchIndexEnabled()
        Returns true if group membership search index is enabled or false otherwise.
        Returns:
        true if group membership search index is enabled or false otherwise.
      • getUserAttributes

        Map<String,​Set<String>> getUserAttributes​(Subject subject,
                                                        Set<String> attrNames)
                                                 throws EntitlementException
        Returns the attribute values of the given user represented by Subject object.
        Parameters:
        subject - identity of the user.
        attrNames - requested attribute names.
        Returns:
        a map of attribute names and their values
        Throws:
        EntitlementException - if this operation failed.