Class NameIDMapping


  • public class NameIDMapping
    extends Object
    This class provides methods to send or process NameIDMappingRequest.
    • Constructor Detail

      • NameIDMapping

        public NameIDMapping()
    • Method Detail

      • initiateNameIDMappingRequest

        public static NameIDMappingResponse initiateNameIDMappingRequest​(Object session,
                                                                         String realm,
                                                                         String spEntityID,
                                                                         String idpEntityID,
                                                                         String targetSPEntityID,
                                                                         String targetNameIDFormat,
                                                                         Map paramsMap)
                                                                  throws SAML2Exception
        Parses the request parameters and builds the NameIDMappingRequest to sent to remote identity provider.
        Parameters:
        session - user session.
        realm - the realm of hosted entity
        spEntityID - entity ID of hosted service provider
        idpEntityID - entity ID of remote idendity provider
        targetSPEntityID - entity ID of target entity ID of service provider
        targetNameIDFormat - format of target Name ID
        paramsMap - Map of all other parameters
        Returns:
        the NameIDMappingResponse
        Throws:
        SAML2Exception - if error initiating request to remote entity.
      • getNameIDMappingService

        public static NameIDMappingServiceElement getNameIDMappingService​(String realm,
                                                                          String entityId,
                                                                          String binding)
                                                                   throws SAML2MetaException
        Returns first NameIDMappingService matching specified binding in an entity under the realm.
        Parameters:
        realm - The realm under which the entity resides.
        entityId - ID of the entity to be retrieved.
        binding - bind type need to has to be matched.
        Returns:
        ManageNameIDServiceElement for the entity or null
        Throws:
        SAML2MetaException - if unable to retrieve the first identity provider's SSO configuration.
        SessionException - invalid or expired single-sign-on session