|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This object stands for Assertion
element. An Assertion
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.
Method Summary | |
EncryptedAssertion |
encrypt(java.security.Key recipientPublicKey,
java.lang.String dataEncAlgorithm,
int dataEncStrength,
java.lang.String recipientEntityID)
Returns an EncryptedAssertion object. |
Advice |
getAdvice()
Returns the advice of the assertion |
java.util.List |
getAttributeStatements()
Returns the attribute statements of the assertion |
java.util.List |
getAuthnStatements()
Returns the AuthnStatements of the assertion |
java.util.List |
getAuthzDecisionStatements()
Returns the AuthzDecisionStatements of the assertion |
Conditions |
getConditions()
Returns the conditions of the assertion |
java.lang.String |
getID()
Returns the id of the assertion |
java.util.Date |
getIssueInstant()
Returns the time when the assertion was issued |
Issuer |
getIssuer()
Returns the issuer of the assertion |
java.lang.String |
getSignature()
Returns the signature of the assertion |
java.util.List |
getStatements()
Returns the statements of the assertion |
Subject |
getSubject()
Returns the subject of the assertion |
java.lang.String |
getVersion()
Returns the version number of the assertion. |
boolean |
isMutable()
Returns true if the object is mutable |
boolean |
isSignatureValid(java.security.cert.X509Certificate senderCert)
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(java.util.List statements)
Sets the attribute statements of the assertion |
void |
setAuthnStatements(java.util.List statements)
Sets the AuthnStatements of the assertion |
void |
setAuthzDecisionStatements(java.util.List statements)
Sets the AuthzDecisionStatements of the assertion |
void |
setConditions(Conditions conditions)
Sets the conditions of the assertion |
void |
setID(java.lang.String id)
Sets the id of the assertion |
void |
setIssueInstant(java.util.Date issueInstant)
Sets the time when the assertion was issued |
void |
setIssuer(Issuer issuer)
Sets the issuer of the assertion |
void |
setStatements(java.util.List statements)
Sets the statements of the assertion |
void |
setSubject(Subject subject)
Sets the subject of the assertion |
void |
setVersion(java.lang.String version)
Sets the version number of the assertion. |
void |
sign(java.security.PrivateKey privateKey,
java.security.cert.X509Certificate cert)
Signs the Assertion. |
java.lang.String |
toXMLString()
Returns a String representation |
java.lang.String |
toXMLString(boolean includeNSPrefix,
boolean declareNS)
Returns a String representation |
Method Detail |
public java.lang.String getVersion()
public void setVersion(java.lang.String version) throws SAML2Exception
version
- the version number.
SAML2Exception
- if the object is immutablepublic java.util.Date getIssueInstant()
public void setIssueInstant(java.util.Date issueInstant) throws SAML2Exception
issueInstant
- the issue time of the assertion
SAML2Exception
- if the object is immutablepublic Subject getSubject()
public void setSubject(Subject subject) throws SAML2Exception
subject
- the subject of the assertion
SAML2Exception
- if the object is immutablepublic Advice getAdvice()
public void setAdvice(Advice advice) throws SAML2Exception
advice
- the advice of the assertion
SAML2Exception
- if the object is immutablepublic java.lang.String getSignature()
public Conditions getConditions()
public void setConditions(Conditions conditions) throws SAML2Exception
conditions
- the conditions of the assertion
SAML2Exception
- if the object is immutablepublic java.lang.String getID()
public void setID(java.lang.String id) throws SAML2Exception
id
- the id of the assertion
SAML2Exception
- if the object is immutablepublic java.util.List getStatements()
public java.util.List getAuthnStatements()
AuthnStatements
of the assertion
AuthnStatements
of the assertionpublic java.util.List getAuthzDecisionStatements()
AuthzDecisionStatements
of the assertion
AuthzDecisionStatements
of the assertionpublic java.util.List getAttributeStatements()
public void setStatements(java.util.List statements) throws SAML2Exception
statements
- the statements of the assertion
SAML2Exception
- if the object is immutablepublic void setAuthnStatements(java.util.List statements) throws SAML2Exception
AuthnStatements
of the assertion
statements
- the AuthnStatements
of the assertion
SAML2Exception
- if the object is immutablepublic void setAuthzDecisionStatements(java.util.List statements) throws SAML2Exception
AuthzDecisionStatements
of the assertion
statements
- the AuthzDecisionStatements
of the assertion
SAML2Exception
- if the object is immutablepublic void setAttributeStatements(java.util.List statements) throws SAML2Exception
statements
- the attribute statements of the assertion
SAML2Exception
- if the object is immutablepublic Issuer getIssuer()
public void setIssuer(Issuer issuer) throws SAML2Exception
issuer
- the issuer of the assertion
SAML2Exception
- if the object is immutablepublic boolean isSigned()
public boolean isSignatureValid(java.security.cert.X509Certificate senderCert) throws SAML2Exception
senderCert
- Certificate containing the public key
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 verifiedpublic boolean isTimeValid()
NotBefore
(current time inclusive) and
NotOnOrAfter
(current time exclusive) values
and true otherwise or if no conditions specified.public void sign(java.security.PrivateKey privateKey, java.security.cert.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 certificate
SAML2Exception
- if it could not sign the assertion.public EncryptedAssertion encrypt(java.security.Key recipientPublicKey, java.lang.String dataEncAlgorithm, int dataEncStrength, java.lang.String recipientEntityID) throws SAML2Exception
EncryptedAssertion
object.
recipientPublicKey
- Public key used to encrypt the data encryption
(secret) key, it is the public key of the
recipient of the XML document to be encrypted.dataEncAlgorithm
- Data encryption algorithm.dataEncStrength
- Data encryption strength.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
object
SAML2Exception
- if error occurs during the encryption process.public java.lang.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 conversionpublic java.lang.String toXMLString() throws SAML2Exception
SAML2Exception
- if something is wrong during conversionpublic void makeImmutable()
public boolean isMutable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |