Skip navigation links

Oracle Security Developer Tools Liberty 1.1 Java API Reference
11g (11.1.1)

E10670-02


oracle.security.xmlsec.liberty.v11
Class LibResponseMessage

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.saml.SAMLMessage
              extended by oracle.security.xmlsec.samlp.ResponseType
                  extended by oracle.security.xmlsec.liberty.v11.LibResponseMessage

Direct Known Subclasses:
AuthnResponse, LogoutResponse, RegisterNameIdentifierResponse

public abstract class LibResponseMessage
extends oracle.security.xmlsec.samlp.ResponseType

This is an abstract base class which holds the common features of the various Liberty protocols response messages.


Field Summary
static java.lang.String NO_AVAILABLE_IDP
          Second-level samlp:StatuesCode value used by an intermediary to indicate that none of the supported identity providers are available.
static java.lang.String NO_SUPPORTED_IDP
          Second-level samlp:StatuesCode value used by an intermediary to indicate that none of the identity providers are supported by the intermediary.
static java.lang.String UNSUPPORTED_PROFILE
          Second-level samlp:StatuesCode value used by an identity provider to indicate that the service provider should retry the request with a different profile.

 

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

 

Constructor Summary
protected LibResponseMessage(org.w3c.dom.Document owner, java.lang.String nsURI, java.lang.String localName)
          Creates a new LibResponseMessage instance.
protected LibResponseMessage(org.w3c.dom.Document owner, java.lang.String nsURI, java.lang.String localName, java.lang.String responseID, java.util.Date issueInstant)
          Creates a new LibResponseMessage instance.
protected LibResponseMessage(org.w3c.dom.Element element)
          Creates a new LibResponseMessage instance from the given Element node.
protected LibResponseMessage(org.w3c.dom.Element element, java.lang.String systemId)
          Creates a new LibResponseMessage instance from the given Element node.

 

Method Summary
 oracle.security.xmlsec.dsig.XSSignature addSignature(java.lang.String signatureMethod, java.lang.String c14nMethod)
          Adds a dsig:Signature to this response, replacing any existing signature.
 oracle.security.xmlsec.dsig.XSSignature addSignature(java.lang.String signatureMethod, java.lang.String c14nMethod, java.lang.String digestMethod)
          Adds a dsig:Signature to this response, replacing any existing signature.
protected  int getChildElementPosition(java.lang.String nsURI, java.lang.String localName)
           
protected abstract  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 abstract  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.
 java.lang.String getId()
          Returns the value of the id attribute of this Liberty response element.
static LibResponseMessage getInstance(org.w3c.dom.Element element)
          Instantiates a concrete LibResponseMessage subclass implementation to wrap the given Element.
 java.lang.String getProviderID()
          Returns the provider's URI based ideitifier contained in the ProviderID child element of this LibResponseMessage.
 java.lang.String getRelayState()
          Returns the value contained in the RelayState child element of this rsponse element, or null if no RelayState element set.
 oracle.security.xmlsec.samlp.Status getStatus()
          Gets the status of this response.
 void setId(java.lang.String id)
          Sets the id attribute of this Liberty response element.
 void setProviderID(java.lang.String providerID)
          Sets the ProviderID child element in this element.
 void setRelayState(java.lang.String value)
          Sets the RelayState child element in this Liberty response element.
 void setStatus(oracle.security.xmlsec.samlp.Status status)
          Sets the samlp:Status child element in this Liberty response element.

 

Methods inherited from class oracle.security.xmlsec.samlp.ResponseType
getID, getInResponseTo, getIssueInstant, getLocalNamesPrecedeDSig, getNSURIsPrecedeDSig, getRecipient, getResponseID, setInResponseTo, setIssueInstant, setRecipient, setResponseID

 

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, getElement, 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

NO_AVAILABLE_IDP

public static final java.lang.String NO_AVAILABLE_IDP
Second-level samlp:StatuesCode value used by an intermediary to indicate that none of the supported identity providers are available. This code is within the Liberty namespace.
See Also:
Constant Field Values

NO_SUPPORTED_IDP

public static final java.lang.String NO_SUPPORTED_IDP
Second-level samlp:StatuesCode value used by an intermediary to indicate that none of the identity providers are supported by the intermediary. This code is within the Liberty namespace.
See Also:
Constant Field Values

UNSUPPORTED_PROFILE

public static final java.lang.String UNSUPPORTED_PROFILE
Second-level samlp:StatuesCode value used by an identity provider to indicate that the service provider should retry the request with a different profile. This code is within the Liberty namespace.
See Also:
Constant Field Values

Constructor Detail

LibResponseMessage

protected LibResponseMessage(org.w3c.dom.Element element)
                      throws org.w3c.dom.DOMException
Creates a new LibResponseMessage instance from the given Element node.
Parameters:
element - A Liberty response XML element.
Throws:
org.w3c.dom.DOMException

LibResponseMessage

protected LibResponseMessage(org.w3c.dom.Element element,
                             java.lang.String systemId)
                      throws org.w3c.dom.DOMException
Creates a new LibResponseMessage instance from the given Element node.
Parameters:
element - A Liberty response XML element.
systemId - The URI string system ID for the LibResponseMessage.
Throws:
org.w3c.dom.DOMException

LibResponseMessage

protected LibResponseMessage(org.w3c.dom.Document owner,
                             java.lang.String nsURI,
                             java.lang.String localName)
                      throws org.w3c.dom.DOMException
Creates a new LibResponseMessage instance.
Parameters:
owner - The owner document of the new LibResponseMessage.
nsURI - The namespace URI in which the new LibResponseMessage is to be created.
localName - The localName of the element represented by the class that extends this abstract class.
Throws:
org.w3c.dom.DOMException

LibResponseMessage

protected LibResponseMessage(org.w3c.dom.Document owner,
                             java.lang.String nsURI,
                             java.lang.String localName,
                             java.lang.String responseID,
                             java.util.Date issueInstant)
                      throws org.w3c.dom.DOMException
Creates a new LibResponseMessage instance.
Parameters:
owner - The owner document of the new LibResponseMessage.
nsURI - The namespace URI in which the new LibResponseMessage is to be created.
localName - The localName of the element represented by the class that extends this abstract class.
responseID - The ResponseID attribute.
issueInstant - The IssueInstant attribute.
Throws:
org.w3c.dom.DOMException

Method Detail

getInstance

public static LibResponseMessage getInstance(org.w3c.dom.Element element)
                                      throws org.w3c.dom.DOMException
Instantiates a concrete LibResponseMessage subclass implementation to wrap the given Element.
Parameters:
element - An Liberty response XML element.
Returns:
A subclass of LibResponseMessage, or null if no appropriate implementation class could be found.
Throws:
org.w3c.dom.DOMException

setId

public void setId(java.lang.String id)
           throws org.w3c.dom.DOMException
Sets the id attribute of this Liberty response element.
Parameters:
id - The ID name of this element.
Throws:
org.w3c.dom.DOMException

getId

public java.lang.String getId()
Returns the value of the id attribute of this Liberty response element.
Returns:
A string containing the ID name of this element, or null if the attribute is missing.

setProviderID

public void setProviderID(java.lang.String providerID)
Sets the ProviderID child element in this element. This required child contains the ProviderID of the provider which sent the response message.
Parameters:
providerID - The URI-based identifier of the provider.

getProviderID

public java.lang.String getProviderID()
Returns the provider's URI based ideitifier contained in the ProviderID child element of this LibResponseMessage.

setStatus

public void setStatus(oracle.security.xmlsec.samlp.Status status)
Sets the samlp:Status child element in this Liberty response element.
Parameters:
status - A oracle.security.xmlsec.samlp.Status object.

getStatus

public oracle.security.xmlsec.samlp.Status getStatus()
Gets the status of this response.
Returns:
A oracle.security.xmlsec.samlp.Status object.

setRelayState

public void setRelayState(java.lang.String value)
Sets the RelayState child element in this Liberty response element. This child is optional which contains state information which may be relayed back in the response.
Parameters:
value - The value for the Relay state.

getRelayState

public java.lang.String getRelayState()
Returns the value contained in the RelayState child element of this rsponse element, or null if no RelayState element set.

addSignature

public oracle.security.xmlsec.dsig.XSSignature addSignature(java.lang.String signatureMethod,
                                                            java.lang.String c14nMethod)
Adds a dsig:Signature to this response, replacing any existing signature. The dsig:SignatureValue is not calculated so, at a minimum, one of the sign() methods must be invoked on the returned oracle.security.xmlsec.dsig.XSSignature object. The code>XSSignature can be used to add a dsig:KeyInfo containing, for example, the signer's public key certificate.

The default Reference digest algorithm is SHA-1. Use the addSignature(String signatureMethod, String c14nMethod, String digestMethod) method to specify an alternative message digest algorithm. See XMLURI for algorithm URI string constants.

Note: If this Response element has an "id" attribute, then its value is used as the target of the new signature's Reference element. If no "id" attribute is present, as would be the case for a samlp:Response, an XPath Filter transform is added to the signature Reference to identify the Response element to be signed.

Overrides:
addSignature in class oracle.security.xmlsec.saml.SAMLMessage
Parameters:
signatureMethod - The URI identifying the signature algorithm to be used.
c14nMethod - The URI identifying the canonicalization algorithm to be used.
Returns:
The newly created signature.
See Also:
XSSignature, XSKeyInfo, XMLURI

addSignature

public oracle.security.xmlsec.dsig.XSSignature addSignature(java.lang.String signatureMethod,
                                                            java.lang.String c14nMethod,
                                                            java.lang.String digestMethod)
Adds a dsig:Signature to this response, replacing any existing signature. The dsig:SignatureValue is not calculated so, at a minimum, one of the sign() methods must be invoked on the returned oracle.security.xmlsec.dsig.XSSignature object. The code>XSSignature can be used to add a dsig:KeyInfo containing, for example, the signer's public key certificate.

See XMLURI for algorithm URI string constants.

Note: If this Response element has an "id" attribute, then its value is used as the target of the new signature's Reference element. If no "id" attribute is present, as would be the case for a samlp:Request, an XPath Filter transform is added to the signature Reference to identify the Response element to be signed.

Overrides:
addSignature in class oracle.security.xmlsec.saml.SAMLMessage
Parameters:
signatureMethod - The URI identifying the signature algorithm to be used.
c14nMethod - The URI identifying the canonicalization algorithm to be used.
digestMethod - The URI identifying the message digest algorithm to be used.
Returns:
The newly created signature.
See Also:
XSSignature, XSKeyInfo, XMLURI

getChildElementsNSURIs

protected abstract 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.

getChildElementsLocalNames

protected abstract 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.

getChildElementPosition

protected int getChildElementPosition(java.lang.String nsURI,
                                      java.lang.String localName)
                               throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

Skip navigation links

Oracle Security Developer Tools Liberty 1.1 Java API Reference
11g (11.1.1)

E10670-02


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