Class FSAssertionManager


  • public final class FSAssertionManager
    extends Object
    IDP side class which handles assertion and artifact operations.
    • Field Detail

      • artStats

        public static Stats artStats
        Statistics instance for artifacts.
      • assrtStats

        public static Stats assrtStats
        Statistics instance for assertions.
    • Method Detail

      • getMetaAlias

        public String getMetaAlias()
        Returns hosted provider meta alias.
        Returns:
        hosted provider meta alias.
        See Also:
        setMetaAlias(String)
      • setMetaAlias

        public void setMetaAlias​(String metaAlias)
        Sets hosted provider meta alias.
        Parameters:
        metaAlias - hosted provider meta alias
        See Also:
        getMetaAlias()
      • getRealm

        public String getRealm()
        Returns the realm which hosted provider resides.
        Returns:
        the realm which hosted provider resides.
        See Also:
        setRealm(String)
      • setRealm

        public void setRealm​(String realm)
        Sets the realm which hosted provider resides.
        Parameters:
        realm - The realm which hosted provider resides
        See Also:
        getRealm()
      • getEntityId

        public String getEntityId()
        Returns hosted provider Entity ID.
        Returns:
        hosted provider Entity ID
        See Also:
        setEntityId(String)
      • setEntityId

        public void setEntityId​(String entityId)
        Sets hosted provider Entity ID.
        Parameters:
        entityId - hosted provider Entity ID
        See Also:
        getEntityId()
      • getArtIdMap

        public Map getArtIdMap()
        Returns artifact to assertion ID map.
        Returns:
        artifact to assertion ID map
      • getIdEntryMap

        public Map getIdEntryMap()
        Returns assertion ID to Entry object map.
        Returns:
        assertion ID to Entry object map
      • getInstance

        public static FSAssertionManager getInstance​(String metaAlias)
                                              throws FSException
        Returns a FSAssertionManager instance.
        Parameters:
        metaAlias - hosted entity ID
        Returns:
        FSAssertionManager instance.
        Throws:
        FSException - if error occurrs.
      • createFSAssertionArtifact

        public AssertionArtifact createFSAssertionArtifact​(String id,
                                                           String realm,
                                                           String spEntityID,
                                                           NameIdentifier spHandle,
                                                           NameIdentifier idpHandle,
                                                           String inResponseTo,
                                                           int minorVersion)
                                                    throws FSException,
                                                           SAMLException
        Creates an assertion artifact.
        Parameters:
        id - session ID
        realm - the realm in which the provider resides
        spEntityID - service provider's entity ID
        spHandle - service provider issued NameIdentifier
        idpHandle - identity provider issued NameIdentifier
        inResponseTo - value to InResponseTo attribute. It's the request ID.
        minorVersion - request minor version, used to determine assertion's minor version
        Throws:
        FSException
        SAMLException
      • createFSAssertion

        public FSAssertion createFSAssertion​(String id,
                                             AssertionArtifact artifact,
                                             String realm,
                                             String spEntityID,
                                             NameIdentifier spHandle,
                                             NameIdentifier idpHandle,
                                             String inResponseTo,
                                             int assertionMinorVersion)
                                      throws FSException,
                                             SAMLException
        Creates an assertion artifact.
        Parameters:
        id - session ID
        artifact - assertion artifact
        realm - the realm under which the entity resides.
        spEntityID - service provider's entity ID
        spHandle - service provider issued NameIdentifier
        idpHandle - identity provider issued NameIdentifier
        inResponseTo - value to InResponseTo attribute. It's the request ID.
        assertionMinorVersion - minor version the assertion should use
        Throws:
        FSException
        SAMLException
      • getAssertion

        public Assertion getAssertion​(AssertionArtifact artifact,
                                      String destID)
                               throws FSException
        Retrieves the assertion associated with an artifact.
        Parameters:
        artifact - assertion artifact
        destID - destination ID of the site who sent the request
        Returns:
        assertion associated with the artifact
        Throws:
        FSException - if the assertion could not be retrieved
      • getDestIdForArtifact

        public String getDestIdForArtifact​(AssertionArtifact artifact)
                                    throws FSException
        Finds the destination id for whom the artifact is issued for.
        Parameters:
        artifact - assertion artifact
        Returns:
        destination id
        Throws:
        FSException - if error occurrs
      • setErrStatus

        public void setErrStatus​(AssertionArtifact aa,
                                 Status s)
        Store the status of a given artifact (original error)
        Parameters:
        aa - reference artifact
        s - stored status
      • getErrorStatus

        public Status getErrorStatus​(AssertionArtifact aa)
        Retrieve the original status of a reference artifact.
        Parameters:
        aa - reference artifact
        Returns:
        The status as originally recorded.