|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Assertion
The 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.
Method Summary | |
---|---|
EncryptedAssertion |
encrypt(Key recipientPublicKey,
String dataEncAlgorithm,
int dataEncStrength,
String recipientEntityID)
Returns an EncryptedAssertion object. |
Advice |
getAdvice()
Returns the advice of the assertion |
List |
getAttributeStatements()
Returns the attribute statements of the assertion |
List |
getAuthnStatements()
Returns the AuthnStatements of the assertion |
List |
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 |
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(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(List statements)
Sets the attribute statements of the assertion |
void |
setAuthnStatements(List statements)
Sets the AuthnStatements of the assertion |
void |
setAuthzDecisionStatements(List 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 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 |
Method Detail |
---|
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 assertion
SAML2Exception
- if the object is immutableSubject getSubject()
void setSubject(Subject subject) throws SAML2Exception
subject
- the subject of the assertion
SAML2Exception
- if the object is immutableAdvice getAdvice()
void setAdvice(Advice advice) throws SAML2Exception
advice
- the advice of the assertion
SAML2Exception
- if the object is immutableString getSignature()
Conditions getConditions()
void setConditions(Conditions conditions) throws SAML2Exception
conditions
- the conditions of the assertion
SAML2Exception
- if the object is immutableString getID()
void setID(String id) throws SAML2Exception
id
- the id of the assertion
SAML2Exception
- if the object is immutableList getStatements()
List getAuthnStatements()
AuthnStatements
of the assertion
AuthnStatements
of the assertionList getAuthzDecisionStatements()
AuthzDecisionStatements
of the assertion
AuthzDecisionStatements
of the assertionList getAttributeStatements()
void setStatements(List statements) throws SAML2Exception
statements
- the statements of the assertion
SAML2Exception
- if the object is immutablevoid setAuthnStatements(List statements) throws SAML2Exception
AuthnStatements
of the assertion
statements
- the AuthnStatements
of the assertion
SAML2Exception
- if the object is immutablevoid setAuthzDecisionStatements(List statements) throws SAML2Exception
AuthzDecisionStatements
of the assertion
statements
- the AuthzDecisionStatements
of
the assertion
SAML2Exception
- if the object is immutablevoid setAttributeStatements(List statements) throws SAML2Exception
statements
- the attribute statements of the assertion
SAML2Exception
- if the object is immutableIssuer getIssuer()
void setIssuer(Issuer issuer) throws SAML2Exception
issuer
- the issuer of the assertion
SAML2Exception
- if the object is immutableboolean isSigned()
boolean isSignatureValid(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 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 certificate
SAML2Exception
- if it could not sign the assertion.EncryptedAssertion encrypt(Key recipientPublicKey, String dataEncAlgorithm, int dataEncStrength, 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.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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |