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
@SupportedAll public class Assertion extends AssertionBase
This object stands forAssertion
element. An Assertion is a package of information that supplies one or moreStatement
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
Constructors Modifier Constructor Description protected
Assertion()
Default constructor Declaring protected to enable extensibilityAssertion(String assertionID, String issuer, Date issueInstant, Conditions conditions, Advice advice, Set<Statement> statements)
ConstructsAssertion
object and populate the data members: theAssertionID
, the issuer, time when assertion issued, the conditions when creating a new assertion ,Advice
applicable to thisAssertion
and a set ofStatement
(s) in the assertion.Assertion(String assertionID, String issuer, Date issueInstant, Conditions conditions, Set<Statement> statements)
ConstructsAssertion
object 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.Assertion(String assertionID, String issuer, Date issueInstant, Set<Statement> statements)
ConstructsAssertion
object and populate the data members:assertionID
, the issuer, time when assertion issued and a set ofStatement
(s) in the assertion.Assertion(Element assertionElement)
ConstructsAssertion
object from a block of existing XML that has already been built into a DOM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AdviceBase
createAdvice(Element adviceElement)
Creates appropriate Advice instanceprotected AssertionIDReference
createAssertionIDReference(String assertionID)
Creates appropriate AssertionIDReference instanceprotected AssertionIDReference
createAssertionIDReference(Element assertionIDRefElement)
Creates appropriate AssertionIDReference instanceprotected AttributeStatement
createAttributeStatement(Element attributeElement)
Creates appropriate AttributeStatement instanceprotected AuthenticationStatement
createAuthenticationStatement(Element authenticationElement)
Creates appropriate AuthenticationStatement instanceprotected AuthorizationDecisionStatementBase
createAuthorizationDecisionStatement(Element authDecisionElement)
Create appropriate AuthorizationDecisionStatement instanceprotected Conditions
createConditions(Element conditionsElement)
Creates appropriate Conditions instanceAdvice
getAdvice()
Returns the advice of an assertion.protected int
getMaxAssertionMinorVersion()
protected int
getMinAssertionMinorVersion()
protected void
parseAssertionElement(Element assertionElement)
protected boolean
processUnknownElement(Element element)
void
signXML(String certAlias)
Signs 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 Detail
-
Assertion
protected Assertion()
Default constructor Declaring protected to enable extensibility
-
Assertion
public Assertion(Element assertionElement) throws SAMLException
ConstructsAssertion
object from a block of existing XML that has already been built into a DOM.- Parameters:
assertionElement
- Aorg.w3c.dom.Element
representing DOM tree forAssertion
object- 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
ConstructsAssertion
object and populate the data members:assertionID
, the issuer, time when assertion issued and a set ofStatement
(s) in the assertion.- Parameters:
assertionID
-assertionID
attribute contained within thisAssertion
if null, anassertionID
is generated internally.issuer
- The issuer of this assertion.issueInstant
- time instant of the issue. It has typedateTime
which is built in to the W3C XML Schema Types specification.if null, current time is used.statements
- set ofStatement
objects within thisAssertion
. It could be of typeAuthenticationStatement
,AuthorizationDecisionStatement
andAttributeStatement
. 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
ConstructsAssertion
object 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
-AssertionID
contained within thisAssertion
if null its generated internally.issuer
- The issuer of this assertion.issueInstant
- time instant of the issue. It has typedateTime
which is built in to the W3C XML Schema Types specification. if null, current time is used.conditions
-Conditions
under which the thisAssertion
is valid.statements
- Set ofStatement
objects within thisAssertion
. It could be of typeAuthenticationStatement
,AuthorizationDecisionStatement
andAttributeStatement
. 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
ConstructsAssertion
object and populate the data members: theAssertionID
, the issuer, time when assertion issued, the conditions when creating a new assertion ,Advice
applicable to thisAssertion
and a set ofStatement
(s) in the assertion.- Parameters:
assertionID
-AssertionID
object contained within thisAssertion
if null its generated internally.issuer
- The issuer of this assertion.issueInstant
- Time instant of the issue. It has typedateTime
which is built in to the W3C XML Schema Types specification. if null, current time is used.conditions
-Conditions
under which the thisAssertion
is valid.advice
-Advice
applicable for thisAssertion
.statements
- Set ofStatement
objects within thisAssertion
. It could be of typeAuthenticationStatement
,AuthorizationDecisionStatement
andAttributeStatement
. Each Assertion can have multiple type of statements in it.- Throws:
SAMLException
- if there is an error in processing input.
-
-
Method Detail
-
signXML
public void signXML(String certAlias) throws SAMLException
Signs the Assertion.- Overrides:
signXML
in classAssertionBase
- Parameters:
certAlias
- certification Alias used to sign Assertion.- Throws:
SAMLException
- if it could not sign the Assertion.
-
parseAssertionElement
protected void parseAssertionElement(Element assertionElement) throws SAMLException
- Throws:
SAMLException
-
getAdvice
public Advice getAdvice()
Returns the advice of an assertion.- Returns:
Advice
object containing advice information of the assertion.
-
createAdvice
protected AdviceBase createAdvice(Element adviceElement) throws SAMLException
Description copied from class:AssertionBase
Creates appropriate Advice instance- Specified by:
createAdvice
in classAssertionBase
- Parameters:
adviceElement
- the Advice Element- Returns:
- the Advice instance
- Throws:
SAMLException
-
createAuthorizationDecisionStatement
protected AuthorizationDecisionStatementBase createAuthorizationDecisionStatement(Element authDecisionElement) throws SAMLException
Description copied from class:AssertionBase
Create appropriate AuthorizationDecisionStatement instance- Specified by:
createAuthorizationDecisionStatement
in classAssertionBase
- Parameters:
authDecisionElement
- the AuthorizationDecisionStatement Element- Returns:
- AuthorizationDecisionStatement instance
- Throws:
SAMLException
-
createAuthenticationStatement
protected AuthenticationStatement createAuthenticationStatement(Element authenticationElement) throws SAMLException
Description copied from class:AssertionBase
Creates appropriate AuthenticationStatement instance- Specified by:
createAuthenticationStatement
in classAssertionBase
- Parameters:
authenticationElement
- the AuthenticationStatement Element- Returns:
- AuthenticationStatement instance
- Throws:
SAMLException
-
createAttributeStatement
protected AttributeStatement createAttributeStatement(Element attributeElement) throws SAMLException
Description copied from class:AssertionBase
Creates appropriate AttributeStatement instance- Specified by:
createAttributeStatement
in classAssertionBase
- Parameters:
attributeElement
- the AttributeStatement Element- Returns:
- AttributeStatement instance
- Throws:
SAMLException
-
createAssertionIDReference
protected AssertionIDReference createAssertionIDReference(Element assertionIDRefElement) throws SAMLException
Description copied from class:AssertionBase
Creates appropriate AssertionIDReference instance- Specified by:
createAssertionIDReference
in classAssertionBase
- Parameters:
assertionIDRefElement
- the AssertionIDReference Element- Returns:
- AssertionIDReference instance
- Throws:
SAMLException
-
createAssertionIDReference
protected AssertionIDReference createAssertionIDReference(String assertionID)
Description copied from class:AssertionBase
Creates appropriate AssertionIDReference instance- Specified by:
createAssertionIDReference
in classAssertionBase
- Parameters:
assertionID
- the AssertionID String- Returns:
- AssertionIDReference instance
-
createConditions
protected Conditions createConditions(Element conditionsElement) throws SAMLException
Description copied from class:AssertionBase
Creates appropriate Conditions instance- Specified by:
createConditions
in classAssertionBase
- Parameters:
conditionsElement
- the Conditions Element- Returns:
- Conditions instance
- Throws:
SAMLException
-
processUnknownElement
protected boolean processUnknownElement(Element element) throws SAMLException
- Throws:
SAMLException
-
getMinAssertionMinorVersion
protected int getMinAssertionMinorVersion()
-
getMaxAssertionMinorVersion
protected int getMaxAssertionMinorVersion()
-
-