Class AuthnStatementImpl
- java.lang.Object
-
- com.sun.identity.saml2.assertion.impl.AuthnStatementImpl
-
- All Implemented Interfaces:
AuthnStatement,Statement
public class AuthnStatementImpl extends Object implements AuthnStatement
This is the default implementation of interfaceAuthnStatement. TheAuthnStatementelement describes a statement by the SAML authority asserting that the assertion subject was authenticated by a particular means at a particular time. It is of typeAuthnStatementType.<complexType name="AuthnStatementType"> <complexContent> <extension base="{urn:oasis:names:tc:SAML:2.0:assertion} StatementAbstractType"> <sequence> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} SubjectLocality" minOccurs="0"/> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthnContext"/> </sequence> <attribute name="AuthnInstant" use="required" type="{http://www.w3.org/2001/XMLSchema}dateTime" /> <attribute name="SessionIndex" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="SessionNotOnOrAfter" type="{http://www.w3.org/2001/XMLSchema}dateTime" /> </extension> </complexContent> </complexType>
-
-
Constructor Summary
Constructors Constructor Description AuthnStatementImpl()Class constructor.AuthnStatementImpl(String xmlString)Class constructor withAuthnStatementin xml string format.AuthnStatementImpl(Element element)Class constructor withAuthnStatementinElementformat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthnContextgetAuthnContext()Returns the value of theAuthnContextproperty.DategetAuthnInstant()Returns the value of theAuthnInstantattribute.StringgetSessionIndex()Returns the value of theSessionIndexattribute.DategetSessionNotOnOrAfter()Returns the value of theSessionNotOnOrAfterattribute.SubjectLocalitygetSubjectLocality()Returns the value of theSubjectLocalityproperty.booleanisMutable()Returns the mutability of the object.voidmakeImmutable()Makes the object immutable.voidsetAuthnContext(AuthnContext value)Sets the value of theAuthnContextproperty.voidsetAuthnInstant(Date value)Sets the value of theAuthnInstantattribute.voidsetSessionIndex(String value)Sets the value of theSessionIndexattribute.voidsetSessionNotOnOrAfter(Date value)Sets the value of theSessionNotOnOrAfterattribute.voidsetSubjectLocality(SubjectLocality value)Sets the value of theSubjectLocalityproperty.StringtoXMLString()Returns a String representation of the element.StringtoXMLString(boolean includeNS, boolean declareNS)Returns a String representation of the element.
-
-
-
Constructor Detail
-
AuthnStatementImpl
public AuthnStatementImpl()
Class constructor. Caller may need to call setters to populate the object.
-
AuthnStatementImpl
public AuthnStatementImpl(Element element) throws SAML2Exception
Class constructor withAuthnStatementinElementformat.- Throws:
SAML2Exception
-
AuthnStatementImpl
public AuthnStatementImpl(String xmlString) throws SAML2Exception
Class constructor withAuthnStatementin xml string format.- Throws:
SAML2Exception
-
-
Method Detail
-
getAuthnContext
public AuthnContext getAuthnContext()
Returns the value of theAuthnContextproperty.- Specified by:
getAuthnContextin interfaceAuthnStatement- Returns:
AuthnContextof the statement.- See Also:
setAuthnContext(AuthnContext)
-
setAuthnContext
public void setAuthnContext(AuthnContext value) throws SAML2Exception
Sets the value of theAuthnContextproperty.- Specified by:
setAuthnContextin interfaceAuthnStatement- Parameters:
value- newAuthnContext.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getAuthnContext()
-
getAuthnInstant
public Date getAuthnInstant()
Returns the value of theAuthnInstantattribute.- Specified by:
getAuthnInstantin interfaceAuthnStatement- Returns:
- the value of the
AuthnInstantattribute. - See Also:
setAuthnInstant(Date)
-
setAuthnInstant
public void setAuthnInstant(Date value) throws SAML2Exception
Sets the value of theAuthnInstantattribute.- Specified by:
setAuthnInstantin interfaceAuthnStatement- Parameters:
value- new value ofAuthnInstantattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getAuthnInstant()
-
getSubjectLocality
public SubjectLocality getSubjectLocality()
Returns the value of theSubjectLocalityproperty.- Specified by:
getSubjectLocalityin interfaceAuthnStatement- Returns:
SubjectLocalityof the statement.- See Also:
setSubjectLocality(SubjectLocality)
-
setSubjectLocality
public void setSubjectLocality(SubjectLocality value) throws SAML2Exception
Sets the value of theSubjectLocalityproperty.- Specified by:
setSubjectLocalityin interfaceAuthnStatement- Parameters:
value- the new value ofSubjectLocality.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getSubjectLocality()
-
getSessionIndex
public String getSessionIndex()
Returns the value of theSessionIndexattribute.- Specified by:
getSessionIndexin interfaceAuthnStatement- Returns:
- the value of the
SessionIndexattribute. - See Also:
setSessionIndex(String)
-
setSessionIndex
public void setSessionIndex(String value) throws SAML2Exception
Sets the value of theSessionIndexattribute.- Specified by:
setSessionIndexin interfaceAuthnStatement- Parameters:
value- new value ofSessionIndexattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getSessionIndex()
-
getSessionNotOnOrAfter
public Date getSessionNotOnOrAfter()
Returns the value of theSessionNotOnOrAfterattribute.- Specified by:
getSessionNotOnOrAfterin interfaceAuthnStatement- Returns:
- the value of
SessionNotOnOrAfterattribute. - See Also:
setSessionNotOnOrAfter(Date)
-
setSessionNotOnOrAfter
public void setSessionNotOnOrAfter(Date value) throws SAML2Exception
Sets the value of theSessionNotOnOrAfterattribute.- Specified by:
setSessionNotOnOrAfterin interfaceAuthnStatement- Parameters:
value- newSessionNotOnOrAfterattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getSessionNotOnOrAfter()
-
makeImmutable
public void makeImmutable()
Makes the object immutable.- Specified by:
makeImmutablein interfaceStatement
-
isMutable
public boolean isMutable()
Returns the mutability of the object.
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceStatement- Returns:
- A string containing the valid XML for this element. By default name space name is prepended to the element name.
- Throws:
SAML2Exception- if the object does not conform to the schema.
-
toXMLString
public String toXMLString(boolean includeNS, boolean declareNS) throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceStatement- Parameters:
includeNS- 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.- Returns:
- A string containing the valid XML for this element
- Throws:
SAML2Exception- if the object does not conform to the schema.
-
-