public final class AssertionManagerClient extends Object
AssertionManagerClient
is a final
class
that provides interfaces to create, get and destroy Assertion
s.
The class provides mechanisms to manage the Assertion
s either
locally (i.e., within the same JVM process) or remotely on another instance
of OpenAM. The default constructor will manage the
Assertion
s locally if it detects SAML web services running locally,
else will use one of the configured OpenAM servers. The constructor which
accepts an URL
will always use the URL to manage the assertions.
Having obtained an instance of AssertionManagerClient
, its
methods can be called to create/get Assertion
, and
AssertionArtifact
, and to obtain decision from an
Query
.
Constructor and Description |
---|
AssertionManagerClient()
Default Constructor
|
AssertionManagerClient(String url)
Constructs an instance of
AssertionManagerClient
that will use the provided URL for the management
of assertions. |
AssertionManagerClient(String[] urls)
Constructs an instance of
AssertionManagerClient
that will use the provided URLs for the management
of assertions. |
Modifier and Type | Method and Description |
---|---|
Assertion |
createAssertion(Object token)
Returns an assertion that contains an authentication statement.
|
Assertion |
createAssertion(Object token,
List attributes)
Returns an assertion that contains an authentication and attribute
statement.
|
AssertionArtifact |
createAssertionArtifact(Assertion assertion,
String target)
Returns an
AssertionArtifact for the given
Assertion . |
Assertion |
getAssertion(AssertionArtifact artifact,
Set destID)
Returns assertion associated with the
AssertionArtifact . |
protected Assertion |
getAssertion(AssertionArtifact artifact,
String destID)
Returns assertion associated with the
AssertionArtifact . |
Assertion |
getAssertion(AssertionIDReference idRef,
Object token)
Returns the
Assertion based on the
AssertionIDReference . |
Assertion |
getAssertion(AssertionIDReference idRef,
Set destID)
Returns the
Assertion based on the
AssertionIDReference . |
Assertion |
getAssertion(AssertionIDReference idRef,
String destID)
Returns the
Assertion based on the
AssertionIDReference |
Set |
getAssertionArtifacts(Object token)
Returns all valid
AssertionArtifacts managed by
this instance (or the identified remote instance) of OpenAM. |
Set |
getAssertions(Object token)
Returns all valid
Assertion s managed by this instance
(or the identified remote instance) of OpenAM. |
public AssertionManagerClient() throws SAMLException
SAMLException
- if it cannot be constructed.public AssertionManagerClient(String url) throws SAMLException
AssertionManagerClient
that will use the provided URL
for the management
of assertions.url
- AssertionManager
service URL that will be used
to create, get and delete assertions.SAMLException
- if it cannot be constructed.public AssertionManagerClient(String[] urls) throws SAMLException
AssertionManagerClient
that will use the provided URLs
for the management
of assertions. In case of server failure, it will fall back
to next available server.urls
- an array of AssertionManager
service URLs that
will be used to create, get and delete assertions.SAMLException
- if it cannot be constructed.public Assertion createAssertion(Object token) throws SAMLException
token
- User session that contains authentication
information which is needed to create the authentication
statement.SAMLException
- if the assertion cannot be created.public Assertion createAssertion(Object token, List attributes) throws SAMLException
token
- User session that contains authentication
information which is needed to create the authentication
statement for the assertion.attributes
- A list of attribute objects which are used to create
the attribute statement.SAMLException
- If the Assertion cannot be created.public AssertionArtifact createAssertionArtifact(Assertion assertion, String target) throws SAMLException
AssertionArtifact
for the given
Assertion
.assertion
- The Assertion for which an Artifact needs to be
created.target
- 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.public Assertion getAssertion(AssertionIDReference idRef, Set destID) throws SAMLException
Assertion
based on the
AssertionIDReference
.idRef
- The AssertionIDReference
which references to an
Assertion.destID
- A set of String that representing the 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.AssertionIDReference
.SAMLException
- if an error occurred during the process; or
the assertion could not be found.public Assertion getAssertion(AssertionIDReference idRef, String destID) throws SAMLException
Assertion
based on the
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.AssertionIDReference
.SAMLException
- If an error occurred during the process; or
the assertion could not be found.public Assertion getAssertion(AssertionArtifact artifact, Set destID) throws SAMLException
AssertionArtifact
.artifact
- An AssertionArtifact
.destID
- A Set of String that represents the destination id.
The destination site requesting the assertion using the
artifact. This String is compared with the destID
that the artifact is created for originally. This field must not
be null or empty set.SAMLException
- If an error occurred during the process, or no
assertion maps to the input artifact.protected Assertion getAssertion(AssertionArtifact artifact, String destID) throws SAMLException
AssertionArtifact
.artifact
- An AssertionArtifact
.destID
- The destination site requesting the assertion using
the artifact. This String is compared with the
destID
that the artifact is created for originally.SAMLException
- If an error occurred during the process, or no
assertion maps to the input artifact.public Assertion getAssertion(AssertionIDReference idRef, Object token) throws SAMLException
Assertion
based on the
AssertionIDReference
.idRef
- The AssertionIDReference
which references to an
Assertion.token
- User session that is allowed to obtain the assertion.
This token must have top level administrator role.AssertionIDReference
.SAMLException
- If an error occurred during the process; or
the assertion could not be found.public Set getAssertionArtifacts(Object token) throws SAMLException
AssertionArtifacts
managed by
this instance (or the identified remote instance) of OpenAM.token
- User session which is allowed to get all
AssertionArtifacts
AssertionArtifacts
. Each element
in the Set is an AssertionArtifact
object
representing an artifact.SAMLException
- If this method can not gets all valid
AssertionArtifacts
.public Set getAssertions(Object token) throws SAMLException
Assertion
s managed by this instance
(or the identified remote instance) of OpenAM.token
- User session which is allowed to get all Assertions.SAMLException
- if this method can not gets all valid Assertions.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.