Package org.opensaml.saml.saml2.core

# Interface AuthnStatement

All Superinterfaces:
  `SAMLObject`, `Statement`, `XMLObject`

All Known Implementing Classes:
  `AuthnStatementImpl`

public interface AuthnStatement extends Statement
SAML 2.0 Core AuthnStatement.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`AUTHN_INSTANT_ATTRIB_NAME`
AuthnInstant attribute name.
`static final QName`
`AUTHN_INSTANT_ATTRIB_QNAME`
AuthnInstant attribute QName.
`static final String`
`DEFAULT_ELEMENT_LOCAL_NAME`
Element local name.
`static final QName`
`DEFAULT_ELEMENT_NAME`
Default element name.
`static final String`
`SESSION_INDEX_ATTRIB_NAME`
SessionIndex attribute name.
`static final String`
`SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME`
SessionNoOnOrAfter attribute name.
`static final QName`
`SESSION_NOT_ON_OR_AFTER_ATTRIB_QNAME`
SessionNotOnOrAfter attribute QName.
`static final String`
`TYPE_LOCAL_NAME`
Local name of the XSI type.
`static final QName`
`TYPE_NAME`
QName of the XSI type.

## Method Summary

Modifier and Type
Method
Description
`AuthnContext`
`getAuthnContext()`
Gets the context used to authenticate the subject.
`Instant`
`getAuthnInstant()`
Gets the time when the authentication took place.
`String`
`getSessionIndex()`
Get the session index between the principal and the authenticating authority.
`Instant`
`getSessionNotOnOrAfter()`
Get the time when the session between the principal and the SAML authority ends.
`SubjectLocality`
`getSubjectLocality()`
Get the DNS domain and IP address of the system where the principal was authenticated.
`void`
`setAuthnContext(AuthnContext newAuthnContext)`
Sets the context used to authenticate the subject.
`void`
`setAuthnInstant(Instant newAuthnInstant)`
Sets the time when the authentication took place.
`void`
`setSessionIndex(String newIndex)`
Sets the session index between the principal and the authenticating authority.
`void`
`setSessionNotOnOrAfter(Instant newSessionNotOnOrAfter)`
Set the time when the session between the principal and the SAML authority ends.
`void`
`setSubjectLocality(SubjectLocality newLocality)`
Set the DNS domain and IP address of the system where the principal was authenticated.

### Methods inherited from interface org.opensaml.core.xml.XMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getOrderedChildren, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation`

## Field Details

### DEFAULT_ELEMENT_LOCAL_NAME

@Nonnull @NotEmpty static final String DEFAULT_ELEMENT_LOCAL_NAME
Element local name.

See Also:
  - Constant Field Values

### DEFAULT_ELEMENT_NAME

@Nonnull static final QName DEFAULT_ELEMENT_NAME
Default element name.

### TYPE_LOCAL_NAME

@Nonnull @NotEmpty static final String TYPE_LOCAL_NAME
Local name of the XSI type.

See Also:
  - Constant Field Values

### TYPE_NAME

@Nonnull static final QName TYPE_NAME
QName of the XSI type.

### AUTHN_INSTANT_ATTRIB_NAME

@Nonnull @NotEmpty static final String AUTHN_INSTANT_ATTRIB_NAME
AuthnInstant attribute name.

See Also:
  - Constant Field Values

### AUTHN_INSTANT_ATTRIB_QNAME

@Nonnull static final QName AUTHN_INSTANT_ATTRIB_QNAME
AuthnInstant attribute QName.

### SESSION_INDEX_ATTRIB_NAME

@Nonnull @NotEmpty static final String SESSION_INDEX_ATTRIB_NAME
SessionIndex attribute name.

See Also:
  - Constant Field Values

### SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME

@Nonnull @NotEmpty static final String SESSION_NOT_ON_OR_AFTER_ATTRIB_NAME
SessionNoOnOrAfter attribute name.

See Also:
  - Constant Field Values

### SESSION_NOT_ON_OR_AFTER_ATTRIB_QNAME

@Nonnull static final QName SESSION_NOT_ON_OR_AFTER_ATTRIB_QNAME
SessionNotOnOrAfter attribute QName.

## Method Details

### getAuthnInstant

@Nullable Instant getAuthnInstant()
Gets the time when the authentication took place.

Returns:
  the time when the authentication took place

### setAuthnInstant

void setAuthnInstant(@Nullable Instant newAuthnInstant)
Sets the time when the authentication took place.

Parameters:
  `newAuthnInstant` - the time when the authentication took place

### getSessionIndex

@Nullable String getSessionIndex()
Get the session index between the principal and the authenticating authority.

Returns:
  the session index between the principal and the authenticating authority

### setSessionIndex

void setSessionIndex(@Nullable String newIndex)
Sets the session index between the principal and the authenticating authority.

Parameters:
  `newIndex` - the session index between the principal and the authenticating authority

### getSessionNotOnOrAfter

@Nullable Instant getSessionNotOnOrAfter()
Get the time when the session between the principal and the SAML authority ends.

Returns:
  the time when the session between the principal and the SAML authority ends

### setSessionNotOnOrAfter

void setSessionNotOnOrAfter(@Nullable Instant newSessionNotOnOrAfter)
Set the time when the session between the principal and the SAML authority ends.

Parameters:
  `newSessionNotOnOrAfter` - the time when the session between the principal and the SAML authority ends

### getSubjectLocality

@Nullable SubjectLocality getSubjectLocality()
Get the DNS domain and IP address of the system where the principal was authenticated.

Returns:
  the DNS domain and IP address of the system where the principal was authenticated

### setSubjectLocality

void setSubjectLocality(@Nullable SubjectLocality newLocality)
Set the DNS domain and IP address of the system where the principal was authenticated.

Parameters:
  `newLocality` - the DNS domain and IP address of the system where the principal was authenticated

### getAuthnContext

@Nullable AuthnContext getAuthnContext()
Gets the context used to authenticate the subject.

Returns:
  the context used to authenticate the subject

### setAuthnContext

void setAuthnContext(@Nullable AuthnContext newAuthnContext)
Sets the context used to authenticate the subject.

Parameters:
  `newAuthnContext` - the context used to authenticate the subject