Package com.sun.identity.saml.assertion
Class Assertion
java.lang.Object
com.sun.identity.saml.assertion.AssertionBase
com.sun.identity.saml.assertion.Assertion
- Direct Known Subclasses:
SecurityAssertion
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 assertionsL Authentication,
AuthorizationDecision and Attribute assertion.-
Field Summary
Fields inherited from class com.sun.identity.saml.assertion.AssertionBase
_advice, _assertionID, _conditions, _issueInstant, _issuer, _majorVersion, _minorVersion, _statements, ASSERTION_ID_ATTRIBUTE, signature, signatureString, signed, validationDone, xmlString -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor Declaring protected to enable extensibilityAssertion(String assertionID, String issuer, Date issueInstant, Conditions conditions, Advice advice, Set<Statement> statements) ConstructsAssertionobject and populate the data members: theAssertionID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertionand a set ofStatement(s) in the assertion.Assertion(String assertionID, String issuer, Date issueInstant, Conditions conditions, Set<Statement> statements) ConstructsAssertionobject and populate the data members: theassertionID, the issuer, time when assertion issued, the conditions when creating a new assertion and a set ofStatement(s) in the assertion.ConstructsAssertionobject and populate the data members:assertionID, the issuer, time when assertion issued and a set ofStatement(s) in the assertion.ConstructsAssertionobject from a block of existing XML that has already been built into a DOM. -
Method Summary
Modifier and TypeMethodDescriptionprotected AdviceBasecreateAdvice(Element adviceElement) Creates appropriate Advice instanceprotected AssertionIDReferencecreateAssertionIDReference(String assertionID) Creates appropriate AssertionIDReference instanceprotected AssertionIDReferencecreateAssertionIDReference(Element assertionIDRefElement) Creates appropriate AssertionIDReference instanceprotected AttributeStatementcreateAttributeStatement(Element attributeElement) Creates appropriate AttributeStatement instanceprotected AuthenticationStatementcreateAuthenticationStatement(Element authenticationElement) Creates appropriate AuthenticationStatement instanceprotected AuthorizationDecisionStatementBasecreateAuthorizationDecisionStatement(Element authDecisionElement) Create appropriate AuthorizationDecisionStatement instanceprotected ConditionscreateConditions(Element conditionsElement) Creates appropriate Conditions instanceReturns the advice of an assertion.protected intprotected intprotected voidparseAssertionElement(Element assertionElement) protected booleanprocessUnknownElement(Element element) voidSigns the Assertion.Methods inherited from class com.sun.identity.saml.assertion.AssertionBase
addStatement, getAssertionID, getConditions, getIssueInstant, getIssuer, getMajorVersion, getMinorVersion, getSignature, getStatement, isTimeValid, setAdvice, setAssertionID, setConditions, setIssueInstant, setIssuer, setMajorVersion, setMinorVersion, setSignature, toString, toString
-
Constructor Details
-
Assertion
protected Assertion()Default constructor Declaring protected to enable extensibility -
Assertion
ConstructsAssertionobject from a block of existing XML that has already been built into a DOM.- Parameters:
assertionElement- Aorg.w3c.dom.Elementrepresenting DOM tree forAssertionobject- Throws:
SAMLException- if it could not process the Element properly, implying that there is an error in the sender or in the element definition.
-
Assertion
public Assertion(String assertionID, String issuer, Date issueInstant, Set<Statement> statements) throws SAMLException ConstructsAssertionobject and populate the data members:assertionID, the issuer, time when assertion issued and a set ofStatement(s) in the assertion.- Parameters:
assertionID-assertionIDattribute contained within thisAssertionif null, anassertionIDis generated internally.issuer- The issuer of this assertion.issueInstant- time instant of the issue. It has typedateTimewhich is built in to the W3C XML Schema Types specification.if null, current time is used.statements- set ofStatementobjects within thisAssertion. It could be of typeAuthenticationStatement,AuthorizationDecisionStatementandAttributeStatement. Each Assertion can have multiple type of statements in it.- Throws:
SAMLException- if there is an error in processing input.
-
Assertion
public Assertion(String assertionID, String issuer, Date issueInstant, Conditions conditions, Set<Statement> statements) throws SAMLException ConstructsAssertionobject and populate the data members: theassertionID, the issuer, time when assertion issued, the conditions when creating a new assertion and a set ofStatement(s) in the assertion.- Parameters:
assertionID-AssertionIDcontained within thisAssertionif null its generated internally.issuer- The issuer of this assertion.issueInstant- time instant of the issue. It has typedateTimewhich is built in to the W3C XML Schema Types specification. if null, current time is used.conditions-Conditionsunder which the thisAssertionis valid.statements- Set ofStatementobjects within thisAssertion. It could be of typeAuthenticationStatement,AuthorizationDecisionStatementandAttributeStatement. Each Assertion can have multiple type of statements in it.- Throws:
SAMLException- if there is an error in processing input.
-
Assertion
public Assertion(String assertionID, String issuer, Date issueInstant, Conditions conditions, Advice advice, Set<Statement> statements) throws SAMLException ConstructsAssertionobject and populate the data members: theAssertionID, the issuer, time when assertion issued, the conditions when creating a new assertion ,Adviceapplicable to thisAssertionand a set ofStatement(s) in the assertion.- Parameters:
assertionID-AssertionIDobject contained within thisAssertionif null its generated internally.issuer- The issuer of this assertion.issueInstant- Time instant of the issue. It has typedateTimewhich is built in to the W3C XML Schema Types specification. if null, current time is used.conditions-Conditionsunder which the thisAssertionis valid.advice-Adviceapplicable for thisAssertion.statements- Set ofStatementobjects within thisAssertion. It could be of typeAuthenticationStatement,AuthorizationDecisionStatementandAttributeStatement. Each Assertion can have multiple type of statements in it.- Throws:
SAMLException- if there is an error in processing input.
-
-
Method Details
-
signXML
Signs the Assertion.- Overrides:
signXMLin classAssertionBase- Parameters:
certAlias- certification Alias used to sign Assertion.- Throws:
SAMLException- if it could not sign the Assertion.
-
parseAssertionElement
- Throws:
SAMLException
-
getAdvice
Returns the advice of an assertion.- Returns:
Adviceobject containing advice information of the assertion.
-
createAdvice
Description copied from class:AssertionBaseCreates appropriate Advice instance- Specified by:
createAdvicein classAssertionBase- Parameters:
adviceElement- the Advice Element- Returns:
- the Advice instance
- Throws:
SAMLException
-
createAuthorizationDecisionStatement
protected AuthorizationDecisionStatementBase createAuthorizationDecisionStatement(Element authDecisionElement) throws SAMLException Description copied from class:AssertionBaseCreate appropriate AuthorizationDecisionStatement instance- Specified by:
createAuthorizationDecisionStatementin classAssertionBase- Parameters:
authDecisionElement- the AuthorizationDecisionStatement Element- Returns:
- AuthorizationDecisionStatement instance
- Throws:
SAMLException
-
createAuthenticationStatement
protected AuthenticationStatement createAuthenticationStatement(Element authenticationElement) throws SAMLException Description copied from class:AssertionBaseCreates appropriate AuthenticationStatement instance- Specified by:
createAuthenticationStatementin classAssertionBase- Parameters:
authenticationElement- the AuthenticationStatement Element- Returns:
- AuthenticationStatement instance
- Throws:
SAMLException
-
createAttributeStatement
protected AttributeStatement createAttributeStatement(Element attributeElement) throws SAMLException Description copied from class:AssertionBaseCreates appropriate AttributeStatement instance- Specified by:
createAttributeStatementin classAssertionBase- Parameters:
attributeElement- the AttributeStatement Element- Returns:
- AttributeStatement instance
- Throws:
SAMLException
-
createAssertionIDReference
protected AssertionIDReference createAssertionIDReference(Element assertionIDRefElement) throws SAMLException Description copied from class:AssertionBaseCreates appropriate AssertionIDReference instance- Specified by:
createAssertionIDReferencein classAssertionBase- Parameters:
assertionIDRefElement- the AssertionIDReference Element- Returns:
- AssertionIDReference instance
- Throws:
SAMLException
-
createAssertionIDReference
Description copied from class:AssertionBaseCreates appropriate AssertionIDReference instance- Specified by:
createAssertionIDReferencein classAssertionBase- Parameters:
assertionID- the AssertionID String- Returns:
- AssertionIDReference instance
-
createConditions
Description copied from class:AssertionBaseCreates appropriate Conditions instance- Specified by:
createConditionsin classAssertionBase- Parameters:
conditionsElement- the Conditions Element- Returns:
- Conditions instance
- Throws:
SAMLException
-
processUnknownElement
- Throws:
SAMLException
-
getMinAssertionMinorVersion
protected int getMinAssertionMinorVersion() -
getMaxAssertionMinorVersion
protected int getMaxAssertionMinorVersion()
-