com.sun.identity.saml
クラス AssertionManager

java.lang.Object
  上位を拡張 com.sun.identity.saml.AssertionManager

public final class AssertionManager
extends Object

The class AssertionManager is a final class that provides interfaces to create, get and destroy Assertions.

It is a singleton class; an instance of this class can be obtained by calling AssertionManager.getInstance().

Having obtained an instance of AssertionManager, its methods can be called to create/get Assertion, and AssertionArtifact, and to obtain decision from an Query.

This class could only be used in the same JVM as the OpenSSO.


メソッドの概要
 Assertion createAssertion(Object token)
          This method creates an Assertion that contains an AuthenticationStatement.
 Assertion createAssertion(Object token, List attributes)
          This method creates an Assertion that contains an AuthenticationStatement and an AttributeStatement.
 AssertionArtifact createAssertionArtifact(Assertion assertion, String destID)
          This method creates an AssertionArtifact for the given Assertion.
 Assertion getAssertion(AssertionIDReference idRef, Object token)
          Gets the Assertion referenced by an AssertionIDReference.
 Assertion getAssertion(AssertionIDReference idRef, Set destID)
          Gets the Assertion referenced by an AssertionIDReference.
 Assertion getAssertion(AssertionIDReference idRef, String destID)
          Gets the Assertion referenced by an AssertionIDReference.
 Set getAssertionArtifacts(Object token)
          This method gets all valid AssertionArtifacts managed by this AssertionManager.
 Set getAssertions(Object token)
          This method gets all valid Assertions managed by this AssertionManager.
static AssertionManager getInstance()
          Gets the singleton instance of AssertionManager.
 

メソッドの詳細

getInstance

public static AssertionManager getInstance()
                                    throws SAMLException
Gets the singleton instance of AssertionManager.

戻り値:
The singleton AssertionManager instance
例外:
SAMLException - if unable to get the singleton AssertionManager instance.

createAssertion

public Assertion createAssertion(Object token)
                          throws SAMLException
This method creates an Assertion that contains an AuthenticationStatement.

パラメータ:
token - user's session object that contains authentication information which is needed to create the AuthenticationStatement.
戻り値:
Assertion The created Assertion.
例外:
SAMLException - If the Assertion cannot be created.

createAssertion

public Assertion createAssertion(Object token,
                                 List attributes)
                          throws SAMLException
This method creates an Assertion that contains an AuthenticationStatement and an AttributeStatement.

パラメータ:
token - User' session object that contains authentication information which is needed to create the AuthenticationStatement for the Assertion.
attributes - A list of Attribute objects which are used to create the AttributeStatement for the Assertion.
戻り値:
Assertion The created Assertion.
例外:
SAMLException - If the Assertion cannot be created.

createAssertionArtifact

public AssertionArtifact createAssertionArtifact(Assertion assertion,
                                                 String destID)
                                          throws SAMLException
This method creates an AssertionArtifact for the given Assertion.

パラメータ:
assertion - The Assertion for which an Artifact needs to be created.
destID - The sourceID of the site for which the AssertionArtifact is created. It is in raw String format (not Base64 encoded, for example.) This String can be obtained from converting the 20 bytes sequence to char Array, then from the char Array to String.
戻り値:
AssertionArtifact
例外:
SAMLException - If the AssertionArtifact cannot be created.

getAssertions

public Set getAssertions(Object token)
                  throws SAMLException
This method gets all valid Assertions managed by this AssertionManager.

パラメータ:
token - User's session object which is allowed to get all Assertion.
戻り値:
A Set of valid Assertion IDs. Each element in the Set is a String representing an Assertion ID.
例外:
SAMLException - If this method can not gets all valid Assertions.

getAssertionArtifacts

public Set getAssertionArtifacts(Object token)
                          throws SAMLException
This method gets all valid AssertionArtifacts managed by this AssertionManager.

パラメータ:
token - User's session object which is allowed to get all AssertionArtifacts.
戻り値:
A Set of valid AssertionArtifacts. Each element in the Set is an AssertionArtifacts object representing an artifact.
例外:
SAMLException - If this method can not gets all valid AssertionArtifacts.

getAssertion

public Assertion getAssertion(AssertionIDReference idRef,
                              Object token)
                       throws SAMLException
Gets the Assertion referenced by an AssertionIDReference. This method is usually used after the call AssertionManager.getAssertions(SSOToken). The assertion is retrieved from this AssertionManager only.

パラメータ:
idRef - The AssertionIDReference which references to an Assertion.
token - Use's session object that is allowed to obtain the assertion. This token must have top level administrator role.
戻り値:
the Assertion referenced by the AsertionIDReference.
例外:
SAMLException - If an error occurred during the process; the token does not have the privilege; or the assertion could not be found.

getAssertion

public Assertion getAssertion(AssertionIDReference idRef,
                              String destID)
                       throws SAMLException
Gets the Assertion referenced by an AssertionIDReference.

パラメータ:
idRef - The AssertionIDReference which references to an Assertion.
destID - The destination site id requesting the assertion using the assertion id reference. This String is compared with the destID that the assertion is created for originally. This field is not used (could be null) if the assertion was created without a destID originally. This String can be obtained from converting the 20 byte site id sequence to char array, then a new String from the char array.
戻り値:
the Assertion referenced by the AsertionIDReference.
例外:
SAMLException - If an error occurred during the process; or the assertion could not be found.

getAssertion

public Assertion getAssertion(AssertionIDReference idRef,
                              Set destID)
                       throws SAMLException
Gets the Assertion referenced by an AssertionIDReference.

パラメータ:
idRef - The AssertionIDReference which references to an Assertion.
destID - A Set of destination site id. The destination site id requesting the assertion using the assertion id reference. This String is compared with the destID that the assertion is created for originally. This field is not used (could be null) if the assertion was created without a destID originally. This String can be obtained from converting the 20 byte site id sequence to char array, then a new String from the char array.
戻り値:
the Assertion referenced by the AsertionIDReference.
例外:
SAMLException - If an error occurred during the process; or the assertion could not be found.