Package org.opensaml.saml.saml2.core.impl

# Class AuthnRequestImpl

java.lang.Object
org.opensaml.core.xml.AbstractXMLObject
org.opensaml.xmlsec.signature.AbstractSignableXMLObject
org.opensaml.saml.common.AbstractSignableSAMLObject
org.opensaml.saml.saml2.core.impl.RequestAbstractTypeImpl
org.opensaml.saml.saml2.core.impl.AuthnRequestImpl

All Implemented Interfaces:
  `XMLObject`, `SAMLObject`, `SignableSAMLObject`, `AuthnRequest`, `RequestAbstractType`, `SignableXMLObject`

public class AuthnRequestImpl extends RequestAbstractTypeImpl implements AuthnRequest
A concrete implementation of `AuthnRequest`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Integer`
`assertionConsumerServiceIndex`
AssertionConsumerServiceIndex attribute.
`private String`
`assertionConsumerServiceURL`
AssertionConsumerServiceURL attribute.
`private Integer`
`attributeConsumingServiceIndex`
AttributeConsumingServiceIndex attribute.
`private Conditions`
`conditions`
Conditions child element.
`private XSBooleanValue`
`forceAuthn`
ForeceAuthn attribute.
`private XSBooleanValue`
`isPassive`
IsPassive attribute.
`private NameIDPolicy`
`nameIDPolicy`
NameIDPolicy child element.
`private String`
`protocolBinding`
ProtocolBinding attribute.
`private String`
`providerName`
ProviderName attribute.
`private RequestedAuthnContext`
`requestedAuthnContext`
RequestedAuthnContext child element.
`private Scoping`
`scoping`
Scoping child element.
`private Subject`
`subject`
Subject child element.

### Fields inherited from interface org.opensaml.saml.saml2.core.AuthnRequest

`ASSERTION_CONSUMER_SERVICE_INDEX_ATTRIB_NAME, ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME, ATTRIBUTE_CONSUMING_SERVICE_INDEX_ATTRIB_NAME, DEFAULT_ELEMENT_LOCAL_NAME, DEFAULT_ELEMENT_NAME, FORCE_AUTHN_ATTRIB_NAME, IS_PASSIVE_ATTRIB_NAME, PROTOCOL_BINDING_ATTRIB_NAME, PROVIDER_NAME_ATTRIB_NAME, TYPE_LOCAL_NAME, TYPE_NAME`

### Fields inherited from interface org.opensaml.saml.saml2.core.RequestAbstractType

`CONSENT_ATTRIB_NAME, DESTINATION_ATTRIB_NAME, EXPLICIT_CONSENT, ID_ATTRIB_NAME, IMPLICIT_CONSENT, INAPPLICABLE_CONSENT, ISSUE_INSTANT_ATTRIB_NAME, ISSUE_INSTANT_ATTRIB_QNAME, OBTAINED_CONSENT, PRIOR_CONSENT, TYPE_LOCAL_NAME, TYPE_NAME, UNAVAILABLE_CONSENT, UNSPECIFIED_CONSENT, VERSION_ATTRIB_NAME`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AuthnRequestImpl(String namespaceURI, String elementLocalName, String namespacePrefix)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Integer`
`getAssertionConsumerServiceIndex()`
Gets the index of the particular Assertion Consumer Service to which the response to this request should be delivered.
`String`
`getAssertionConsumerServiceURL()`
Gets the URL of the particular Assertion Consumer Service to which the response to this request should be delivered.
`Integer`
`getAttributeConsumingServiceIndex()`
Gets the index of the Attribute Consuming Service which describes the SAML attributes the requester desires or requires to be supplied in the `Response` message.
`Conditions`
`getConditions()`
Gets the `Conditions` of the request.
`NameIDPolicy`
`getNameIDPolicy()`
Gets the `NameIDPolicy` of the request.
`List<XMLObject>`
`getOrderedChildren()`
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.
`String`
`getProtocolBinding()`
Gets the protocol binding URI for the request.
`String`
`getProviderName()`
Gets the human-readable name of the requester for use by the presenter's user agent or the identity provider.
`RequestedAuthnContext`
`getRequestedAuthnContext()`
Gets the `RequestedAuthnContext` of the request.
`Scoping`
`getScoping()`
Gets the `Scoping` of the request.
`Subject`
`getSubject()`
Gets the `Subject` of the request.
`Boolean`
`isForceAuthn()`
Gets whether the IdP should force the user to reauthenticate.
`XSBooleanValue`
`isForceAuthnXSBoolean()`
Gets whether the IdP should force the user to reauthenticate.
`Boolean`
`isPassive()`
Gets whether the IdP should refrain from interacting with the user during the authentication process.
`XSBooleanValue`
`isPassiveXSBoolean()`
Gets whether the IdP should refrain from interacting with the user during the authentication process.
`void`
`setAssertionConsumerServiceIndex(Integer newAssertionConsumerServiceIndex)`
Sets the index of the particular Assertion Consumer Service to which the response to this request should be delivered.
`void`
`setAssertionConsumerServiceURL(String newAssertionConsumerServiceURL)`
Sets the URL of the particular Assertion Consumer Service to which the response to this request should be delivered.
`void`
`setAttributeConsumingServiceIndex(Integer newAttributeConsumingServiceIndex)`
Sets the index of the Attribute Consuming Service which describes the SAML attributes the requester desires or requires to be supplied in the `Response` message.
`void`
`setConditions(Conditions newConditions)`
Sets the `Conditions` of the request.
`void`
`setForceAuthn(Boolean newForceAuth)`
Sets whether the IdP should force the user to reauthenticate.
`void`
`setForceAuthn(XSBooleanValue newForceAuthn)`
Sets whether the IdP should force the user to reauthenticate.
`void`
`setIsPassive(Boolean newIsPassive)`
Sets whether the IdP should refrain from interacting with the user during the authentication process.
`void`
`setIsPassive(XSBooleanValue newIsPassive)`
Sets whether the IdP should refrain from interacting with the user during the authentication process.
`void`
`setNameIDPolicy(NameIDPolicy newNameIDPolicy)`
Sets the `NameIDPolicy` of the request.
`void`
`setProtocolBinding(String newProtocolBinding)`
Sets the protocol binding URI for the request.
`void`
`setProviderName(String newProviderName)`
Sets the human-readable name of the requester for use by the presenter's user agent or the identity provider.
`void`
`setRequestedAuthnContext(RequestedAuthnContext newRequestedAuthnContext)`
Sets the `RequestedAuthnContext` of the request.
`void`
`setScoping(Scoping newScoping)`
Sets the `Scoping` of the request.
`void`
`setSubject(Subject newSubject)`
Sets the `Subject` of the request.

### Methods inherited from class org.opensaml.saml.saml2.core.impl.RequestAbstractTypeImpl

`getConsent, getDestination, getExtensions, getID, getIssueInstant, getIssuer, getSignatureReferenceID, getVersion, setConsent, setDestination, setExtensions, setID, setIssueInstant, setIssuer, setVersion`

### Methods inherited from class org.opensaml.saml.common.AbstractSignableSAMLObject

`equals, hashCode, setSignature`

### Methods inherited from class org.opensaml.xmlsec.signature.AbstractSignableXMLObject

`getSignature, isSigned`

### Methods inherited from class org.opensaml.core.xml.AbstractXMLObject

`detach, ensureDOM, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getObjectMetadata, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.opensaml.saml.saml2.core.RequestAbstractType

`getConsent, getDestination, getExtensions, getID, getIssueInstant, getIssuer, getVersion, setConsent, setDestination, setExtensions, setID, setIssueInstant, setIssuer, setVersion`

### Methods inherited from interface org.opensaml.saml.common.SignableSAMLObject

`getSignatureReferenceID`

### Methods inherited from interface org.opensaml.xmlsec.signature.SignableXMLObject

`getSignature, isSigned, setSignature`

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

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

## Field Details

### subject

@Nullable private Subject subject
Subject child element.

### nameIDPolicy

@Nullable private NameIDPolicy nameIDPolicy
NameIDPolicy child element.

### conditions

@Nullable private Conditions conditions
Conditions child element.

### requestedAuthnContext

@Nullable private RequestedAuthnContext requestedAuthnContext
RequestedAuthnContext child element.

### scoping

@Nullable private Scoping scoping
Scoping child element.

### forceAuthn

@Nullable private XSBooleanValue forceAuthn
ForeceAuthn attribute.

### isPassive

@Nullable private XSBooleanValue isPassive
IsPassive attribute.

### protocolBinding

@Nullable private String protocolBinding
ProtocolBinding attribute.

### assertionConsumerServiceIndex

@Nullable private Integer assertionConsumerServiceIndex
AssertionConsumerServiceIndex attribute.

### assertionConsumerServiceURL

@Nullable private String assertionConsumerServiceURL
AssertionConsumerServiceURL attribute.

### attributeConsumingServiceIndex

@Nullable private Integer attributeConsumingServiceIndex
AttributeConsumingServiceIndex attribute.

### providerName

@Nullable private String providerName
ProviderName attribute.

## Constructor Details

### AuthnRequestImpl

protected AuthnRequestImpl(@Nullable String namespaceURI, @Nonnull String elementLocalName, @Nullable String namespacePrefix)
Constructor.

Parameters:
  `namespaceURI` - the namespace the element is in
  `elementLocalName` - the local name of the XML element this Object represents
  `namespacePrefix` - the prefix for the given namespace

## Method Details

### isForceAuthn

@Nullable public Boolean isForceAuthn()
Gets whether the IdP should force the user to reauthenticate.

Specified by:
  `isForceAuthn` in interface `AuthnRequest`
Returns:
  whether the IdP should force the user to reauthenticate

### isForceAuthnXSBoolean

@Nullable public XSBooleanValue isForceAuthnXSBoolean()
Gets whether the IdP should force the user to reauthenticate.

Specified by:
  `isForceAuthnXSBoolean` in interface `AuthnRequest`
Returns:
  whether the IdP should force the user to reauthenticate

### setForceAuthn

public void setForceAuthn(@Nullable Boolean newForceAuth)
Sets whether the IdP should force the user to reauthenticate. Boolean values will be marshalled to either "true" or "false".

Specified by:
  `setForceAuthn` in interface `AuthnRequest`
Parameters:
  `newForceAuth` - whether the IdP should force the user to reauthenticate

### setForceAuthn

public void setForceAuthn(@Nullable XSBooleanValue newForceAuthn)
Sets whether the IdP should force the user to reauthenticate.

Specified by:
  `setForceAuthn` in interface `AuthnRequest`
Parameters:
  `newForceAuthn` - whether the IdP should force the user to reauthenticate

### isPassive

@Nullable public Boolean isPassive()
Gets whether the IdP should refrain from interacting with the user during the authentication process.

Specified by:
  `isPassive` in interface `AuthnRequest`
Returns:
  whether the IdP should refrain from interacting with the user during the authentication process

### isPassiveXSBoolean

@Nullable public XSBooleanValue isPassiveXSBoolean()
Gets whether the IdP should refrain from interacting with the user during the authentication process.

Specified by:
  `isPassiveXSBoolean` in interface `AuthnRequest`
Returns:
  whether the IdP should refrain from interacting with the user during the authentication process

### setIsPassive

public void setIsPassive(@Nullable Boolean newIsPassive)
Sets whether the IdP should refrain from interacting with the user during the authentication process. Boolean values will be marshalled to either "true" or "false".

Specified by:
  `setIsPassive` in interface `AuthnRequest`
Parameters:
  `newIsPassive` - whether the IdP should refrain from interacting with the user during the authentication process

### setIsPassive

public void setIsPassive(@Nullable XSBooleanValue newIsPassive)
Sets whether the IdP should refrain from interacting with the user during the authentication process.

Specified by:
  `setIsPassive` in interface `AuthnRequest`
Parameters:
  `newIsPassive` - whether the IdP should refrain from interacting with the user during the authentication process

### getProtocolBinding

@Nullable public String getProtocolBinding()
Gets the protocol binding URI for the request.

Specified by:
  `getProtocolBinding` in interface `AuthnRequest`
Returns:
  the value of the ProtocolBinding attribute

### setProtocolBinding

public void setProtocolBinding(@Nullable String newProtocolBinding)
Sets the protocol binding URI for the request.

Specified by:
  `setProtocolBinding` in interface `AuthnRequest`
Parameters:
  `newProtocolBinding` - the new value of the ProtocolBinding attribute

### getAssertionConsumerServiceIndex

@Nullable public Integer getAssertionConsumerServiceIndex()
Gets the index of the particular Assertion Consumer Service to which the response to this request should be delivered.

Specified by:
  `getAssertionConsumerServiceIndex` in interface `AuthnRequest`
Returns:
  the value of the AssertionConsumerServiceIndex attribute

### setAssertionConsumerServiceIndex

public void setAssertionConsumerServiceIndex(@Nullable Integer newAssertionConsumerServiceIndex)
Sets the index of the particular Assertion Consumer Service to which the response to this request should be delivered.

Specified by:
  `setAssertionConsumerServiceIndex` in interface `AuthnRequest`
Parameters:
  `newAssertionConsumerServiceIndex` - the new value of the AssertionConsumerServiceIndex attribute

### getAssertionConsumerServiceURL

@Nullable public String getAssertionConsumerServiceURL()
Gets the URL of the particular Assertion Consumer Service to which the response to this request should be delivered.

Specified by:
  `getAssertionConsumerServiceURL` in interface `AuthnRequest`
Returns:
  the value of the AssertionConsumerServiceURL attribute

### setAssertionConsumerServiceURL

public void setAssertionConsumerServiceURL(@Nullable String newAssertionConsumerServiceURL)
Sets the URL of the particular Assertion Consumer Service to which the response to this request should be delivered.

Specified by:
  `setAssertionConsumerServiceURL` in interface `AuthnRequest`
Parameters:
  `newAssertionConsumerServiceURL` - the new value of the AssertionConsumerServiceURL attribute

### getAttributeConsumingServiceIndex

@Nullable public Integer getAttributeConsumingServiceIndex()
Gets the index of the Attribute Consuming Service which describes the SAML attributes the requester desires or requires to be supplied in the `Response` message.

Specified by:
  `getAttributeConsumingServiceIndex` in interface `AuthnRequest`
Returns:
  the value of the AssertionConsumerServiceIndex attribute

### setAttributeConsumingServiceIndex

public void setAttributeConsumingServiceIndex(@Nullable Integer newAttributeConsumingServiceIndex)
Sets the index of the Attribute Consuming Service which describes the SAML attributes the requester desires or requires to be supplied in the `Response` message.

Specified by:
  `setAttributeConsumingServiceIndex` in interface `AuthnRequest`
Parameters:
  `newAttributeConsumingServiceIndex` - the new value of the AttributeConsumingServiceIndex attribute

### getProviderName

@Nullable public String getProviderName()
Gets the human-readable name of the requester for use by the presenter's user agent or the identity provider.

Specified by:
  `getProviderName` in interface `AuthnRequest`
Returns:
  the value of the ProviderName attribute

### setProviderName

public void setProviderName(@Nullable String newProviderName)
Sets the human-readable name of the requester for use by the presenter's user agent or the identity provider.

Specified by:
  `setProviderName` in interface `AuthnRequest`
Parameters:
  `newProviderName` - the new value of the ProviderName attribute

### getSubject

@Nullable public Subject getSubject()
Gets the `Subject` of the request.

Specified by:
  `getSubject` in interface `AuthnRequest`
Returns:
  the Subject of the request

### setSubject

public void setSubject(@Nullable Subject newSubject)
Sets the `Subject` of the request.

Specified by:
  `setSubject` in interface `AuthnRequest`
Parameters:
  `newSubject` - the new value of the Subject of the request

### getNameIDPolicy

@Nullable public NameIDPolicy getNameIDPolicy()
Gets the `NameIDPolicy` of the request.

Specified by:
  `getNameIDPolicy` in interface `AuthnRequest`
Returns:
  the NameIDPolicy of the request

### setNameIDPolicy

public void setNameIDPolicy(@Nullable NameIDPolicy newNameIDPolicy)
Sets the `NameIDPolicy` of the request.

Specified by:
  `setNameIDPolicy` in interface `AuthnRequest`
Parameters:
  `newNameIDPolicy` - the new value of the NameIDPolicy of the request

### getConditions

@Nullable public Conditions getConditions()
Gets the `Conditions` of the request.

Specified by:
  `getConditions` in interface `AuthnRequest`
Returns:
  the Conditions of the request

### setConditions

public void setConditions(@Nullable Conditions newConditions)
Sets the `Conditions` of the request.

Specified by:
  `setConditions` in interface `AuthnRequest`
Parameters:
  `newConditions` - the new value of the Conditions of the request

### getRequestedAuthnContext

@Nullable public RequestedAuthnContext getRequestedAuthnContext()
Gets the `RequestedAuthnContext` of the request.

Specified by:
  `getRequestedAuthnContext` in interface `AuthnRequest`
Returns:
  the RequestedAuthnContext of the request

### setRequestedAuthnContext

public void setRequestedAuthnContext(@Nullable RequestedAuthnContext newRequestedAuthnContext)
Sets the `RequestedAuthnContext` of the request.

Specified by:
  `setRequestedAuthnContext` in interface `AuthnRequest`
Parameters:
  `newRequestedAuthnContext` - the new value of the RequestedAuthnContext of the request

### getScoping

@Nullable public Scoping getScoping()
Gets the `Scoping` of the request.

Specified by:
  `getScoping` in interface `AuthnRequest`
Returns:
  the Scoping of the request

### setScoping

public void setScoping(@Nullable Scoping newScoping)
Sets the `Scoping` of the request.

Specified by:
  `setScoping` in interface `AuthnRequest`
Parameters:
  `newScoping` - the new value of the Scoping of the request

### getOrderedChildren

@Nullable @NotLive @Unmodifiable public List<XMLObject> getOrderedChildren()
Gets an unmodifiable list of child elements in the order that they will appear in the DOM.

Specified by:
  `getOrderedChildren` in interface `XMLObject`
Overrides:
  `getOrderedChildren` in class `RequestAbstractTypeImpl`
Returns:
  ordered list of child elements