public class AuthnContextImpl extends Object implements AuthnContext
AuthnContext
.
The AuthnContext
element 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 is AuthnContextType
.
<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 and Description |
---|
AuthnContextImpl()
Class constructor.
|
AuthnContextImpl(Element element)
Class constructor with
AuthnContext in Element
format. |
AuthnContextImpl(String xmlString)
Class constructor with
AuthnContext in xml string format. |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAuthenticatingAuthority()
Returns the value of the
AuthenticatingAuthority property. |
String |
getAuthnContextClassRef()
Returns the value of the
AuthnContextClassRef property. |
String |
getAuthnContextDecl()
Returns the value of the
AuthnContextDecl property. |
String |
getAuthnContextDeclRef()
Returns the value of the
AuthnContextDeclRef property. |
boolean |
isMutable()
Returns the mutability of the object.
|
void |
makeImmutable()
Makes the object immutable.
|
void |
setAuthenticatingAuthority(List<String> value)
Sets the value of the
AuthenticatingAuthority property. |
void |
setAuthnContextClassRef(String value)
Sets the value of the
AuthnContextClassRef property. |
void |
setAuthnContextDecl(String value)
Sets the value of the
AuthnContextDecl property. |
void |
setAuthnContextDeclRef(String value)
Sets the value of the
AuthnContextDeclRef property. |
String |
toXMLString()
Returns a String representation of the element.
|
String |
toXMLString(boolean includeNS,
boolean declareNS)
Returns a String representation of the element.
|
public AuthnContextImpl()
public AuthnContextImpl(Element element) throws SAML2Exception
AuthnContext
in Element
format.SAML2Exception
public AuthnContextImpl(String xmlString) throws SAML2Exception
AuthnContext
in xml string format.SAML2Exception
public void makeImmutable()
makeImmutable
in interface AuthnContext
public boolean isMutable()
isMutable
in interface AuthnContext
true
if the object is mutable;
false
otherwise.public String getAuthnContextClassRef()
AuthnContextClassRef
property.getAuthnContextClassRef
in interface AuthnContext
AuthnContextClassRef
.AuthnContext.setAuthnContextClassRef(String)
public void setAuthnContextClassRef(String value) throws SAML2Exception
AuthnContextClassRef
property.setAuthnContextClassRef
in interface AuthnContext
value
- new AuthenticationContextClassRef
.SAML2Exception
- if the object is immutable.AuthnContext.getAuthnContextClassRef()
public String getAuthnContextDeclRef()
AuthnContextDeclRef
property.getAuthnContextDeclRef
in interface AuthnContext
AuthnContext.setAuthnContextDeclRef(String)
public void setAuthnContextDeclRef(String value) throws SAML2Exception
AuthnContextDeclRef
property.setAuthnContextDeclRef
in interface AuthnContext
value
- A String representation of authentication context
declaration reference.SAML2Exception
- if the object is immutable.AuthnContext.getAuthnContextDeclRef()
public String getAuthnContextDecl()
AuthnContextDecl
property.getAuthnContextDecl
in interface AuthnContext
AuthnContext.setAuthnContextDecl(String)
public void setAuthnContextDecl(String value) throws SAML2Exception
AuthnContextDecl
property.setAuthnContextDecl
in interface AuthnContext
value
- An XML String representing authentication context
declaration.SAML2Exception
- if the object is immutable.AuthnContext.getAuthnContextDecl()
public void setAuthenticatingAuthority(List<String> value) throws SAML2Exception
AuthenticatingAuthority
property.setAuthenticatingAuthority
in interface AuthnContext
value
- List of Strings representing authenticating authority.SAML2Exception
- If the object is immutable.AuthnContext.getAuthenticatingAuthority()
public List<String> getAuthenticatingAuthority()
AuthenticatingAuthority
property.getAuthenticatingAuthority
in interface AuthnContext
AuthenticatingAuthority
.AuthnContext.setAuthenticatingAuthority(List)
public String toXMLString() throws SAML2Exception
toXMLString
in interface AuthnContext
SAML2Exception
- if the object does not conform to the schema.public String toXMLString(boolean includeNS, boolean declareNS) throws SAML2Exception
toXMLString
in interface AuthnContext
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.SAML2Exception
- if the object does not conform to the schema.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.