Class DefaultAttributeMapper

  • All Implemented Interfaces:
    AttributeMapper

    public class DefaultAttributeMapper
    extends Object
    implements AttributeMapper
    The class DefaultAttributeMapper provide a default implementation of the AttributeMapper interface.
    • Constructor Detail

      • DefaultAttributeMapper

        public DefaultAttributeMapper()
        Default Constructor
    • Method Detail

      • getSSOTokenID

        public String getSSOTokenID​(AttributeQuery query)
        This method exams the SubjectConfirmation of the Subject in the AttributeQuery. If it has only one ConfirmationMethod, and this ConfirmationMethod equals to "urn:com:sun:identity"; and its SubjectConfirmationData contains TEXT node only, then the method returns the concatenated string of all the TEXT nodes. Otherwise, it returns null.

        Specified by:
        getSSOTokenID in interface AttributeMapper
        Parameters:
        query - the AttributeQuery object.
        Returns:
        String which is the single sign on token ID.
        See Also:
        AttributeMapper.getSSOTokenID(com.sun.identity.saml.protocol.AttributeQuery)
      • getAttributes

        public List getAttributes​(AttributeQuery query,
                                  String sourceID,
                                  Object token)
                           throws SAMLException
        This method first mapps the Subject in the query to a local site account using the AccountMapper defined in the SAML Service. The source ID is used to find the appropriate AccountMapper. It then calls the User Management API to obtain the attribute value using the Session and the attribute name in the AttributeDesignator(s) of the query. If there is no AttributeDesignator in the query, attributes of services specified as userServiceNameList in amSAML.properties will be returned.

        Specified by:
        getAttributes in interface AttributeMapper
        Parameters:
        query - the AttributeQuery object.
        sourceID - the Source Identifier.
        token - User Session
        Returns:
        A List of Attributes
        Throws:
        SAMLException - if there is an error.