Skip navigation links

Oracle Fusion Middleware Web Services Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10678-04


oracle.security.xmlsec.wss
Class WSSecurityTokenReference

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.wss.WSSElement
              extended by oracle.security.xmlsec.wss.WSSecurityTokenReference

All Implemented Interfaces:
oracle.security.xmlsec.keys.KeyInfoData

public class WSSecurityTokenReference
extends WSSElement
implements oracle.security.xmlsec.keys.KeyInfoData

This class represents the WSS SecurityTokenReference element for referencing security tokens.


Field Summary

 

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

 

Constructor Summary
WSSecurityTokenReference(org.w3c.dom.Document owner)
          Create a new WSSecurityTokenReference instance from the given XML element.
WSSecurityTokenReference(org.w3c.dom.Element element)
          Create a new WSSecurityTokenReference instance from the given XML element.
WSSecurityTokenReference(org.w3c.dom.Element element, java.lang.String systemId)
          Create a new WSSecurityTokenReference instance from the given XML element.

 

Method Summary
 javax.crypto.SecretKey computeImpliedDerivedKeys(javax.crypto.SecretKey key)
          If there no wsc:Nonce attribute, then return the key directly, otherwise compute a derived key from it, and return that
static WSSecurityTokenReferenceType createSTReference(org.w3c.dom.Element element)
          Create a WSS security token reference mechanism.
 java.lang.Integer getDerivedKeyLength()
          Get the wsc:Length attribute, which is used for Derived Keys
 byte[] getDerivedKeyNonce()
          Get the wsc:Nonce attribute, which is used for Derived Keys
 WSSecurityTokenReferenceType getSTReference()
          Get the underlying security token reference mechanism.
 java.lang.String getTokenType()
          Get the TokenType attribute.
 java.lang.String getType()
          Get the type identifier.
 java.lang.String getUsage()
          Get the Usage attribute.
 void setDerivedKeyLength(java.lang.Integer length)
          Set the wsc:Length attribute, which is used for Derived Keys
 void setDerivedKeyNonce(byte[] nonce)
          Set the wsc:Nonce attribute, which is used for Derived Keys
 void setSTReference(WSSecurityTokenReferenceType ref)
          Set the underlying security token reference mechanism.
 void setTokenType(java.lang.String tokenType)
          Set the TokenType attribute.
 void setUsage(java.lang.String usage)
          Set the Usage attribute.

 

Methods inherited from class oracle.security.xmlsec.wss.WSSElement
getId, getWsuId, setId, setWsuId

 

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

 

Constructor Detail

WSSecurityTokenReference

public WSSecurityTokenReference(org.w3c.dom.Element element)
Create a new WSSecurityTokenReference instance from the given XML element.
Parameters:
element - A wsse:SecurityTokenReference element.

WSSecurityTokenReference

public WSSecurityTokenReference(org.w3c.dom.Element element,
                                java.lang.String systemId)
Create a new WSSecurityTokenReference instance from the given XML element.
Parameters:
element - A wsse:SecurityTokenReference element.
systemId - The URI string system ID for this element.

WSSecurityTokenReference

public WSSecurityTokenReference(org.w3c.dom.Document owner)
Create a new WSSecurityTokenReference instance from the given XML element.
Parameters:
owner - A XML Document to be used as the owner document of this structure.

Method Detail

setUsage

public void setUsage(java.lang.String usage)
Set the Usage attribute.
Parameters:
usage - The wsse:Usage attribute value.

getUsage

public java.lang.String getUsage()
Get the Usage attribute.
Returns:
The wsse:Usage attribute value.

setTokenType

public void setTokenType(java.lang.String tokenType)
Set the TokenType attribute.
Parameters:
tokenType - The wsse:TokenType attribute value.

getTokenType

public java.lang.String getTokenType()
Get the TokenType attribute.
Returns:
The wsse:TokenType attribute value.

setSTReference

public void setSTReference(WSSecurityTokenReferenceType ref)
Set the underlying security token reference mechanism.
Parameters:
ref - The WSSecurityTokenReferenceType reference mechanism element.

getSTReference

public WSSecurityTokenReferenceType getSTReference()
                                            throws WSSException
Get the underlying security token reference mechanism.
Returns:
The WSSecurityTokenReferenceType.
Throws:
WSSException

getType

public java.lang.String getType()
Get the type identifier.
Specified by:
getType in interface oracle.security.xmlsec.keys.KeyInfoData
Returns:
null

createSTReference

public static WSSecurityTokenReferenceType createSTReference(org.w3c.dom.Element element)
                                                      throws WSSException
Create a WSS security token reference mechanism.
Parameters:
element - The element representing a security token reference mechanism.
Returns:
The WSSecurityTokenReferenceType instance.
Throws:
WSSException

getDerivedKeyNonce

public byte[] getDerivedKeyNonce()
Get the wsc:Nonce attribute, which is used for Derived Keys
Returns:

setDerivedKeyNonce

public void setDerivedKeyNonce(byte[] nonce)
Set the wsc:Nonce attribute, which is used for Derived Keys
Parameters:
nonce - null will remove the wsc:Nonce attribute

getDerivedKeyLength

public java.lang.Integer getDerivedKeyLength()
Get the wsc:Length attribute, which is used for Derived Keys
Returns:

setDerivedKeyLength

public void setDerivedKeyLength(java.lang.Integer length)
Set the wsc:Length attribute, which is used for Derived Keys
Parameters:
length - null will remove the wsc:Length attribute

computeImpliedDerivedKeys

public javax.crypto.SecretKey computeImpliedDerivedKeys(javax.crypto.SecretKey key)
If there no wsc:Nonce attribute, then return the key directly, otherwise compute a derived key from it, and return that
Parameters:
key -
Returns:

Skip navigation links

Oracle Fusion Middleware Web Services Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10678-04


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