Class DefaultSPAttributeMapper

  • All Implemented Interfaces:
    SPAttributeMapper

    public class DefaultSPAttributeMapper
    extends DefaultAttributeMapper
    implements SPAttributeMapper
    This class DefaultSPAttribute implements SPAttributeMapper for mapping the assertion attributes to local attributes configured in the provider configuration.
    • Constructor Detail

      • DefaultSPAttributeMapper

        public DefaultSPAttributeMapper()
        Constructor.
    • Method Detail

      • getAttributes

        public Map<String,​Set<String>> getAttributes​(List<Attribute> attributes,
                                                           String userID,
                                                           String hostEntityID,
                                                           String remoteEntityID,
                                                           String realm)
                                                    throws SAML2Exception
        Returns attribute map for the given list of Attribute objects.
        Specified by:
        getAttributes in interface SPAttributeMapper
        Parameters:
        attributes - list Attributeobjects.
        userID - universal identifier or distinguished name(DN) of the user.
        hostEntityID - EntityID of the hosted provider.
        remoteEntityID - EntityID of the remote provider.
        realm - realm name.
        Returns:
        a map of mapped attribute value pair. This map has the key as the attribute name and the value as the attribute value
        Throws:
        SAML2Exception - if any failure.
      • needToUnescapeXMLSpecialCharacters

        protected boolean needToUnescapeXMLSpecialCharacters​(String hostEntityID,
                                                             String remoteEntityID,
                                                             String realm)
        Decides whether it needs to unescape XML special characters for attribute values or not.
        Parameters:
        hostEntityID - Entity ID for hosted provider.
        remoteEntityID - Entity ID for remote provider.
        realm - the providers are in.
        Returns:
        true if it should unescape special characters for attribute values; false otherwise.