Class DefaultAccountMapper

  • Direct Known Subclasses:
    DefaultIDPAccountMapper, DefaultLibrarySPAccountMapper

    public class DefaultAccountMapper
    extends Object
    This class DefaultAccountMapper is a base class that the DefaultSPAccountMapper and DefaultIDPAccountMapper shall extend from this class. This class implements the common interface methods that are required for the SP and IDP account mappers and also provide some utility classes that can be shared between these mappers.
    • Constructor Detail

      • DefaultAccountMapper

        public DefaultAccountMapper()
        Default constructor
    • Method Detail

      • getIdentity

        public String getIdentity​(ManageNameIDRequest manageNameIDRequest,
                                  String hostEntityID,
                                  String realm)
                           throws SAML2Exception
        Returns the user's disntinguished name or the universal ID for the corresponding SAML ManageNameIDRequest. This method will be invoked by the SAML framework for retrieving the user identity while processing the ManageIDRequest.
        Parameters:
        manageNameIDRequest - SAML ManageNameIDRequest that needs to be mapped to the user.
        hostEntityID - EntityID of the hosted provider.
        realm - realm or the organization name that may be used to find the user information.
        Returns:
        user's disntinguished name or the universal ID.
        Throws:
        SAML2Exception - if any failure.
      • getAttribute

        protected String getAttribute​(String realm,
                                      String entityID,
                                      String attributeName)
        Returns the attribute value configured in the given entity SP or IDP configuration.
        Parameters:
        realm - realm name.
        entityID - hosted EntityID.
        attributeName - name of the attribute.