Class AuthnContextImpl
- java.lang.Object
-
- com.sun.identity.saml2.assertion.impl.AuthnContextImpl
-
- All Implemented Interfaces:
AuthnContext
public class AuthnContextImpl extends Object implements AuthnContext
This is the default implementation of interfaceAuthnContext. TheAuthnContextelement specifies the context of an authentication event. The element can contain an authentication context class reference, an authentication declaration or declaration reference, or both. Its type isAuthnContextType.<complexType name="AuthnContextType"> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <choice> <sequence> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthnContextClassRef"/> <choice minOccurs="0"> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthnContextDecl"/> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthnContextDeclRef"/> </choice> </sequence> <choice> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthnContextDecl"/> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthnContextDeclRef"/> </choice> </choice> <element ref="{urn:oasis:names:tc:SAML:2.0:assertion} AuthenticatingAuthority" maxOccurs="unbounded" minOccurs="0"/> </sequence> </restriction> </complexContent> </complexType>
-
-
Constructor Summary
Constructors Constructor Description AuthnContextImpl()Class constructor.AuthnContextImpl(String xmlString)Class constructor withAuthnContextin xml string format.AuthnContextImpl(Element element)Class constructor withAuthnContextinElementformat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getAuthenticatingAuthority()Returns the value of theAuthenticatingAuthorityproperty.StringgetAuthnContextClassRef()Returns the value of theAuthnContextClassRefproperty.StringgetAuthnContextDecl()Returns the value of theAuthnContextDeclproperty.StringgetAuthnContextDeclRef()Returns the value of theAuthnContextDeclRefproperty.booleanisMutable()Returns the mutability of the object.voidmakeImmutable()Makes the object immutable.voidsetAuthenticatingAuthority(List<String> value)Sets the value of theAuthenticatingAuthorityproperty.voidsetAuthnContextClassRef(String value)Sets the value of theAuthnContextClassRefproperty.voidsetAuthnContextDecl(String value)Sets the value of theAuthnContextDeclproperty.voidsetAuthnContextDeclRef(String value)Sets the value of theAuthnContextDeclRefproperty.StringtoXMLString()Returns a String representation of the element.StringtoXMLString(boolean includeNS, boolean declareNS)Returns a String representation of the element.
-
-
-
Constructor Detail
-
AuthnContextImpl
public AuthnContextImpl()
Class constructor. Caller may need to call setters to populate the object.
-
AuthnContextImpl
public AuthnContextImpl(Element element) throws SAML2Exception
Class constructor withAuthnContextinElementformat.- Throws:
SAML2Exception
-
AuthnContextImpl
public AuthnContextImpl(String xmlString) throws SAML2Exception
Class constructor withAuthnContextin xml string format.- Throws:
SAML2Exception
-
-
Method Detail
-
makeImmutable
public void makeImmutable()
Makes the object immutable.- Specified by:
makeImmutablein interfaceAuthnContext
-
isMutable
public boolean isMutable()
Returns the mutability of the object.- Specified by:
isMutablein interfaceAuthnContext- Returns:
trueif the object is mutable;falseotherwise.
-
getAuthnContextClassRef
public String getAuthnContextClassRef()
Returns the value of theAuthnContextClassRefproperty.- Specified by:
getAuthnContextClassRefin interfaceAuthnContext- Returns:
- the value of the
AuthnContextClassRef. - See Also:
AuthnContext.setAuthnContextClassRef(String)
-
setAuthnContextClassRef
public void setAuthnContextClassRef(String value) throws SAML2Exception
Sets the value of theAuthnContextClassRefproperty.- Specified by:
setAuthnContextClassRefin interfaceAuthnContext- Parameters:
value- newAuthenticationContextClassRef.- Throws:
SAML2Exception- if the object is immutable.- See Also:
AuthnContext.getAuthnContextClassRef()
-
getAuthnContextDeclRef
public String getAuthnContextDeclRef()
Returns the value of theAuthnContextDeclRefproperty.- Specified by:
getAuthnContextDeclRefin interfaceAuthnContext- Returns:
- A String representing authentication context declaration reference.
- See Also:
AuthnContext.setAuthnContextDeclRef(String)
-
setAuthnContextDeclRef
public void setAuthnContextDeclRef(String value) throws SAML2Exception
Sets the value of theAuthnContextDeclRefproperty.- Specified by:
setAuthnContextDeclRefin interfaceAuthnContext- Parameters:
value- A String representation of authentication context declaration reference.- Throws:
SAML2Exception- if the object is immutable.- See Also:
AuthnContext.getAuthnContextDeclRef()
-
getAuthnContextDecl
public String getAuthnContextDecl()
Returns the value of theAuthnContextDeclproperty.- Specified by:
getAuthnContextDeclin interfaceAuthnContext- Returns:
- An XML String representing authentication context declaration.
- See Also:
AuthnContext.setAuthnContextDecl(String)
-
setAuthnContextDecl
public void setAuthnContextDecl(String value) throws SAML2Exception
Sets the value of theAuthnContextDeclproperty.- Specified by:
setAuthnContextDeclin interfaceAuthnContext- Parameters:
value- An XML String representing authentication context declaration.- Throws:
SAML2Exception- if the object is immutable.- See Also:
AuthnContext.getAuthnContextDecl()
-
setAuthenticatingAuthority
public void setAuthenticatingAuthority(List<String> value) throws SAML2Exception
Sets the value of theAuthenticatingAuthorityproperty.- Specified by:
setAuthenticatingAuthorityin interfaceAuthnContext- Parameters:
value- List of Strings representing authenticating authority.- Throws:
SAML2Exception- If the object is immutable.- See Also:
AuthnContext.getAuthenticatingAuthority()
-
getAuthenticatingAuthority
public List<String> getAuthenticatingAuthority()
Returns the value of theAuthenticatingAuthorityproperty.- Specified by:
getAuthenticatingAuthorityin interfaceAuthnContext- Returns:
- List of Strings representing
AuthenticatingAuthority. - See Also:
AuthnContext.setAuthenticatingAuthority(List)
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceAuthnContext- 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 interfaceAuthnContext- 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.
-
-