Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Liberty 1.1 Java API Reference 10g Release 3 (10.1.3) B25384-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.xmlsec.liberty.v11
Class AuthnRequest

`java.lang.Object
oracle.security.xmlsec.util.XMLNode
oracle.security.xmlsec.util.XMLElement
oracle.security.xmlsec.saml.SAMLMessage
oracle.security.xmlsec.samlp.RequestType
oracle.security.xmlsec.liberty.v11.LibRequestMessage
oracle.security.xmlsec.liberty.v11.AuthnRequest`

public class AuthnRequest
extends LibRequestMessage

This class represents the AuthnRequest element in the Liberty Single Sign-On and Federation protocol. An AuthnRequest request message is sent from a service provider to an identity provider, instructing the identity provider to provide an authentication assertion to the service provider. Optionally, the service provider may require the identity be federated.

See Also:
  `AuthnResponse`, `AuthnRequestEnvelope`

Field Summary
`static java.lang.String` | `BETTER` The value "better" for the `AuthnCotextComparison` element indicating that the identity provider is asked to use a context better than any specified in the `AuthnContext`.
`static java.lang.String` | `EXACT` The value "exact" for the `AuthnCotextComparison` element indicating that the identity provider is asked to match at least one of context specified in the `AuthnContext`.
`static java.lang.String` | `MINIMUM` The value "minimum" for the `AuthnCotextComparison` element indicating that the identity provider is asked to use a context that he feels at least as good as any specified in the `AuthnContext`.

Fields inherited from class oracle.security.xmlsec.samlp.RequestType
`ATTRIBUTE_STATEMENT, AUTHENTICATION_STATEMENT, AUTHORIZATION_DECISION_STATEMENT`

Fields inherited from class oracle.security.xmlsec.util.XMLNode
`node, systemId`

Constructor Summary
`AuthnRequest(org.w3c.dom.Document owner)` Creates a new `AuthnRequest` instance within the specified XML Document.
`AuthnRequest(org.w3c.dom.Document owner, java.lang.String requestId, java.util.Date issueInstant, java.lang.String providerId)` Creates a new `AuthnRequest` instance within the specified XML Document.
`AuthnRequest(org.w3c.dom.Element element)` Creates a new `AuthnRequest` instance from the given Element node.
`AuthnRequest(org.w3c.dom.Element element, java.lang.String systemId)` Creates a new `AuthnRequest` instance from the given Element node.

Method Summary
`void` | `addAuthnContextClassRef(java.lang.String accrURI)` Adds an AuthnContextClassRef element to the AuthnContext child element in this AuthnRequest element.
`void` | `addAuthnContextStatementRef(java.lang.String acsrURI)` Adds an AuthnContextStatementRef element to the AuthnContext child element in this AuthnRequest element.
`java.util.List` | `getAuthnContextClassRefs()` Returns a list of URI's for AuthnContextClassRef's contained in the AuthnContext child element in this structure.
`java.lang.String` | `getAuthnContextComparison()` Returns the value contained in the AuthnContextComparison child element of this AuthnRequest, or the default value "exact" if AuthnContextComparison child element is not specified.
`java.util.List` | `getAuthnContextStatementRefs()` Returns a list of URI's for AuthnContextStatementRef's contained in the AuthnContext child element in this structure.
`protected java.lang.String[]` | `getChildElementsLocalNames()` Returns the orderded set of the local names of the child elements specified in the schema for the XML element represented by the concrete subclass.
`protected java.lang.String[]` | `getChildElementsNSURIs()` Returns the orderded set of the namespce URIs for the child elements specified in the schema for the XML element represented by the concrete subclass.
`boolean` | `getFederate()` Returns the boolen value contained in the Federate child element of this AuthnRequest, or "false" by default if Force child is not specified.
`boolean` | `getForceAuthn()` Returns the boolen value contained in the ForceAuthn child element of this AuthnRequest, or "false" by default if Force child is not specified.
`boolean` | `getIsPassive()` Returns the boolen value contained in the IsPassive child element of this AuthnRequest, or "true" by default if IsPassive child is not specified.
`java.lang.String` | `getProtocolProfile()` Returns the URI for the protocol profile specified in the ProtocolProfile child element of this AuthnRequest, or the default "http://projectliberty.org/profiles/brws-art" if ProtocolProfile element is not specified.
`void` | `setAuthnContextComparison(java.lang.String value)` Sets the AuthnContextComparison child element in this AuthnRequest element.
`void` | `setFederate(boolean federate)` Sets the Federate child element in this AuthnRequest element.
`void` | `setForceAuthn(boolean forceAuthn)` Sets the ForceAuthn child element in this AuthnRequest element.
`void` | `setIsPassive(boolean isPassive)` Sets the IsPassive child element in this AuthnRequest element.
`void` | `setProtocolProfile(java.lang.String ppURI)` Sets the ProtocolProfile child element in this AuthnRequest element.
`java.lang.String` | `toURLString(oracle.security.crypto.core.PrivateKey key, java.lang.String sigAlg)` Returns this `AuthnRequest` as a URL-encoded query string, optionally signed using the given private key and signature algorithm.

Methods inherited from class oracle.security.xmlsec.liberty.v11.LibRequestMessage
`addSignature, addSignature, getChildElementPosition, getId, getInstance, getProviderID, getRelayState, setId, setProviderID, setRelayState`

Methods inherited from class oracle.security.xmlsec.samlp.RequestType
`addRespondWith, addRespondWithValue, getID, getIssueInstant, getLocalNamesPrecedeDSig, getNSURIsPrecedeDSig, getRequestID, getRespondWiths, getRespondWithValues, setIssueInstant, setRequestID`

Methods inherited from class oracle.security.xmlsec.saml.SAMLMessage
`clearSignature, getInstance, getMajorVersion, getMinorVersion, getSignature, isSigned, setVersion, sign, sign, verify, verify`

Methods inherited from class oracle.security.xmlsec.util.XMLElement
`addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix`

Methods inherited from class oracle.security.xmlsec.util.XMLNode
`appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EXACT

    public static final java.lang.String EXACT

  The value "exact" for the `AuthnCotextComparison` element indicating that the identity provider is asked to match at least one of context specified in the `AuthnContext`.
  See Also:
    Constant Field Values

### MINIMUM

    public static final java.lang.String MINIMUM

  The value "minimum" for the `AuthnCotextComparison` element indicating that the identity provider is asked to use a context that he feels at least as good as any specified in the `AuthnContext`.
  See Also:
    Constant Field Values

### BETTER

    public static final java.lang.String BETTER

  The value "better" for the `AuthnCotextComparison` element indicating that the identity provider is asked to use a context better than any specified in the `AuthnContext`.
  See Also:
    Constant Field Values

Constructor Detail

### AuthnRequest

    public AuthnRequest(org.w3c.dom.Element element)
                 throws org.w3c.dom.DOMException

  Creates a new `AuthnRequest` instance from the given Element node.
Parameters:
  `element` - A Liberty `AuthnRequest` XML element.

### AuthnRequest

    public AuthnRequest(org.w3c.dom.Element element,
                        java.lang.String systemId)
                 throws org.w3c.dom.DOMException

  Creates a new `AuthnRequest` instance from the given Element node.
Parameters:
  `element` - A Liberty `AuthnRequest` XML element.
  `systemId` - The URI string system ID for the `AuthnRequest`.

### AuthnRequest

    public AuthnRequest(org.w3c.dom.Document owner)
                 throws org.w3c.dom.DOMException

  Creates a new `AuthnRequest` instance within the specified XML Document.
Parameters:
  `owner` - The owner document of the new Liberty `AuthnRequest` element.

### AuthnRequest

    public AuthnRequest(org.w3c.dom.Document owner,
                        java.lang.String requestId,
                        java.util.Date issueInstant,
                        java.lang.String providerId)

  Creates a new `AuthnRequest` instance within the specified XML Document.
Parameters:
  `owner` - The owner document of the new Liberty AuthnRequest element.
  `requestId` - The `RequestID` attribute.
  `issueInstant` - The `IssueInstant` attribute.
  `providerId` - The `ProviderID` child element.

Method Detail

### setForceAuthn

    public void setForceAuthn(boolean forceAuthn)
                       throws org.w3c.dom.DOMException

  Sets the ForceAuthn child element in this AuthnRequest element. This child is optional. It is only specified when IsPassive is false. If not specified, "true" is presumed.
  Parameters:
    `forceAuthn` - If true, the identity provider must authenticate the Principle; if false, the identity provider must reauthenticate the Principle only if the Principle is not currently authenticated.
  Throws:
    `org.w3c.dom.DOMException`

### setIsPassive

    public void setIsPassive(boolean isPassive)
                      throws org.w3c.dom.DOMException

  Sets the IsPassive child element in this AuthnRequest element. This child is optional. If not specified, "true" is presumed.
  Parameters:
    `isPassive` - If true, the identity provider must not interact with the Principle; if false, the identity provider may interact with the Principle.
  Throws:
    `org.w3c.dom.DOMException`

### setFederate

    public void setFederate(boolean federate)
                     throws org.w3c.dom.DOMException

  Sets the Federate child element in this AuthnRequest element. This child is optional. If not specifed, "false" is presumed.
  Parameters:
    `federate` - If true, the service provider wishes to federate the identity of the Principle.
  Throws:
    `org.w3c.dom.DOMException`

### setProtocolProfile

    public void setProtocolProfile(java.lang.String ppURI)
                            throws org.w3c.dom.DOMException

  Sets the ProtocolProfile child element in this AuthnRequest element. This child is optional. If this element is not specified, the default protocol profile is "http://projectliberty.org/profiles/brws-art".
  Parameters:
    `ppURI` - The URI identifies the the protocol profile the service provider wishes to use in the response.
  Throws:
    `org.w3c.dom.DOMException`

### addAuthnContextClassRef

    public void addAuthnContextClassRef(java.lang.String accrURI)

  Adds an AuthnContextClassRef element to the AuthnContext child element in this AuthnRequest element. See `AuthenticationContextURI` for the list of supported authentication context classes identifying URIs.
  Parameters:
    `accrURI` - The URI identifies an authentication context class.

### addAuthnContextStatementRef

    public void addAuthnContextStatementRef(java.lang.String acsrURI)

  Adds an AuthnContextStatementRef element to the AuthnContext child element in this AuthnRequest element.
  Parameters:
    `acsrURI` - The URI identifies an authentication context statement.

### setAuthnContextComparison

    public void setAuthnContextComparison(java.lang.String value)

  Sets the AuthnContextComparison child element in this AuthnRequest element. The value for AuthnContextComparison can be "exact" (`EXACT`), "minimum" (`MINIMUM`) or "better" (`BETTER`). If this element is not specified, "exact" is assumed.
  Parameters:
    `value` - The value for this AuthnContextComparison element.

### getIsPassive

    public boolean getIsPassive()

  Returns the boolen value contained in the IsPassive child element of this AuthnRequest, or "true" by default if IsPassive child is not specified.

### getForceAuthn

    public boolean getForceAuthn()

  Returns the boolen value contained in the ForceAuthn child element of this AuthnRequest, or "false" by default if Force child is not specified.

### getFederate

    public boolean getFederate()

  Returns the boolen value contained in the Federate child element of this AuthnRequest, or "false" by default if Force child is not specified.

### getProtocolProfile

    public java.lang.String getProtocolProfile()

  Returns the URI for the protocol profile specified in the ProtocolProfile child element of this AuthnRequest, or the default "http://projectliberty.org/profiles/brws-art" if ProtocolProfile element is not specified.

### getAuthnContextClassRefs

    public java.util.List getAuthnContextClassRefs()

  Returns a list of URI's for AuthnContextClassRef's contained in the AuthnContext child element in this structure.
  Returns:
    A `List` object containing String objects, or an empty `List` if no AuthnContextClassRef has been set.

### getAuthnContextStatementRefs

    public java.util.List getAuthnContextStatementRefs()

  Returns a list of URI's for AuthnContextStatementRef's contained in the AuthnContext child element in this structure.
  Returns:
    A `List` object containing String objects, or an empty `List` if no AuthnContextStatementRef has been set.

### getAuthnContextComparison

    public java.lang.String getAuthnContextComparison()

  Returns the value contained in the AuthnContextComparison child element of this AuthnRequest, or the default value "exact" if AuthnContextComparison child element is not specified.

### toURLString

    public java.lang.String toURLString(oracle.security.crypto.core.PrivateKey key,
                                        java.lang.String sigAlg)
                                 throws oracle.security.xmlsec.dsig.SigningException

  Returns this `AuthnRequest` as a URL-encoded query string, optionally signed using the given private key and signature algorithm.
  Parameters:
    `key` - The private signing key. If `null`, the query string will not be signed.
    `sigAlg` - The URI identifying the signature algorithm to use. If `null`, the query string will not be signed.
  Throws:
    `oracle.security.xmlsec.dsig.SigningException` - If an error occurs computing the signature.
  Since:
    2.0 Build B

### getChildElementsNSURIs

    protected java.lang.String[] getChildElementsNSURIs()

  Description copied from class: `LibRequestMessage`
  Returns the orderded set of the namespce URIs for the child elements specified in the schema for the XML element represented by the concrete subclass.
  Specified by:
    `getChildElementsNSURIs` in class `LibRequestMessage`

### getChildElementsLocalNames

    protected java.lang.String[] getChildElementsLocalNames()

  Description copied from class: `LibRequestMessage`
  Returns the orderded set of the local names of the child elements specified in the schema for the XML element represented by the concrete subclass.
  Specified by:
    `getChildElementsLocalNames` in class `LibRequestMessage`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Liberty 1.1 Java API Reference 10g Release 3 (10.1.3) B25384-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.