public interface Assertion
Assertion
element is a package of information
that supplies one or more Statement
made by an issuer.
There are three kinds of assertions: Authentication, Authorization Decision,
and Attribute assertions.Modifier and Type | Method and Description |
---|---|
EncryptedAssertion |
encrypt(EncryptionConfig encryptionConfig,
String recipientEntityID)
Returns an
EncryptedAssertion object. |
Advice |
getAdvice()
Returns the advice of the assertion
|
List<AttributeStatement> |
getAttributeStatements()
Returns the attribute statements of the assertion
|
List<AuthnStatement> |
getAuthnStatements()
Returns the
AuthnStatements of the assertion |
List<AuthzDecisionStatement> |
getAuthzDecisionStatements()
Returns the
AuthzDecisionStatements of the assertion |
Conditions |
getConditions()
Returns the conditions of the assertion
|
String |
getID()
Returns the id of the assertion
|
Date |
getIssueInstant()
Returns the time when the assertion was issued
|
Issuer |
getIssuer()
Returns the issuer of the assertion
|
String |
getSignature()
Returns the signature of the assertion
|
List<Object> |
getStatements()
Returns the statements of the assertion
|
Subject |
getSubject()
Returns the subject of the assertion
|
String |
getVersion()
Returns the version number of the assertion.
|
boolean |
isMutable()
Returns true if the object is mutable
|
boolean |
isSignatureValid(Set<X509Certificate> verificationCerts)
Return whether the signature is valid or not.
|
boolean |
isSigned()
Return true if the assertion is signed
|
boolean |
isTimeValid()
Gets the validity of the assertion evaluating its conditions if
specified.
|
void |
makeImmutable()
Makes the object immutable
|
void |
setAdvice(Advice advice)
Sets the advice of the assertion
|
void |
setAttributeStatements(List<AttributeStatement> statements)
Sets the attribute statements of the assertion
|
void |
setAuthnStatements(List<AuthnStatement> statements)
Sets the
AuthnStatements of the assertion |
void |
setAuthzDecisionStatements(List<AuthzDecisionStatement> statements)
Sets the
AuthzDecisionStatements of the assertion |
void |
setConditions(Conditions conditions)
Sets the conditions of the assertion
|
void |
setID(String id)
Sets the id of the assertion
|
void |
setIssueInstant(Date issueInstant)
Sets the time when the assertion was issued
|
void |
setIssuer(Issuer issuer)
Sets the issuer of the assertion
|
void |
setStatements(List<Object> statements)
Sets the statements of the assertion
|
void |
setSubject(Subject subject)
Sets the subject of the assertion
|
void |
setVersion(String version)
Sets the version number of the assertion.
|
void |
sign(PrivateKey privateKey,
X509Certificate cert)
Signs the Assertion.
|
String |
toXMLString()
Returns a String representation
|
String |
toXMLString(boolean includeNSPrefix,
boolean declareNS)
Returns a String representation
|
String getVersion()
void setVersion(String version) throws SAML2Exception
version
- the version number.SAML2Exception
- if the object is immutableDate getIssueInstant()
void setIssueInstant(Date issueInstant) throws SAML2Exception
issueInstant
- the issue time of the assertionSAML2Exception
- if the object is immutableSubject getSubject()
void setSubject(Subject subject) throws SAML2Exception
subject
- the subject of the assertionSAML2Exception
- if the object is immutableAdvice getAdvice()
void setAdvice(Advice advice) throws SAML2Exception
advice
- the advice of the assertionSAML2Exception
- if the object is immutableString getSignature()
Conditions getConditions()
void setConditions(Conditions conditions) throws SAML2Exception
conditions
- the conditions of the assertionSAML2Exception
- if the object is immutableString getID()
void setID(String id) throws SAML2Exception
id
- the id of the assertionSAML2Exception
- if the object is immutableList<Object> getStatements()
List<AuthnStatement> getAuthnStatements()
AuthnStatements
of the assertionAuthnStatements
of the assertionList<AuthzDecisionStatement> getAuthzDecisionStatements()
AuthzDecisionStatements
of the assertionAuthzDecisionStatements
of the assertionList<AttributeStatement> getAttributeStatements()
void setStatements(List<Object> statements) throws SAML2Exception
statements
- the statements of the assertionSAML2Exception
- if the object is immutablevoid setAuthnStatements(List<AuthnStatement> statements) throws SAML2Exception
AuthnStatements
of the assertionstatements
- the AuthnStatements
of the assertionSAML2Exception
- if the object is immutablevoid setAuthzDecisionStatements(List<AuthzDecisionStatement> statements) throws SAML2Exception
AuthzDecisionStatements
of the assertionstatements
- the AuthzDecisionStatements
of
the assertionSAML2Exception
- if the object is immutablevoid setAttributeStatements(List<AttributeStatement> statements) throws SAML2Exception
statements
- the attribute statements of the assertionSAML2Exception
- if the object is immutableIssuer getIssuer()
void setIssuer(Issuer issuer) throws SAML2Exception
issuer
- the issuer of the assertionSAML2Exception
- if the object is immutableboolean isSigned()
boolean isSignatureValid(Set<X509Certificate> verificationCerts) throws SAML2Exception
verificationCerts
- Certificates containing the public keys which may be used for signature verification;
This certificate may also may be used to check against the certificate included in the
signature.SAML2Exception
- if the signature could not be verifiedboolean isTimeValid()
NotBefore
(current time inclusive) and
NotOnOrAfter
(current time exclusive) values
and true otherwise or if no conditions specified.void sign(PrivateKey privateKey, X509Certificate cert) throws SAML2Exception
privateKey
- Signing keycert
- Certificate which contain the public key correlated to
the signing key; It if is not null, then the signature
will include the certificate; Otherwise, the signature
will not include any certificateSAML2Exception
- if it could not sign the assertion.EncryptedAssertion encrypt(EncryptionConfig encryptionConfig, String recipientEntityID) throws SAML2Exception
EncryptedAssertion
object.encryptionConfig
- The encryption config.recipientEntityID
- Unique identifier of the recipient, it is used as the index to the cached secret key so
that the key can be reused for the same recipient; It can be null in which case the secret key will be generated
every time and will not be cached and reused. Note that the generation of a secret key is a relatively expensive
operation.EncryptedAssertion
objectSAML2Exception
- if error occurs during the encryption process.String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
includeNSPrefix
- Determines whether or not the namespace qualifier
is prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is declared
within the Element.SAML2Exception
- if something is wrong during conversionString toXMLString() throws SAML2Exception
SAML2Exception
- if something is wrong during conversionvoid makeImmutable()
boolean isMutable()
Copyright © 2010-2018, ForgeRock All Rights Reserved.