Skip navigation links

Oracle Security Developer Tools Web Services Security Java API Reference
11g (11.1.1)

E10678-02


oracle.security.xmlsec.wss
Class WSSKeyIdentifier

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.WSSKeyIdentifier

All Implemented Interfaces:
WSSecurityTokenReferenceType
Direct Known Subclasses:
KerberosKeyIdentifier, SAML2AssertionKeyIdentifier, SAMLAssertionKeyIdentifier, WSSEncryptedKeyIdentifier, X509KeyIdentifier

public class WSSKeyIdentifier
extends WSSElement
implements WSSecurityTokenReferenceType

The base class for wsse:KeyIdentifier that is used within a wsse:SecurityTokenReference element to reference a security token using an opaque identifier.


Field Summary
static java.lang.String vt_ThumbprintSHA1
          A KeyIdentifier ValueType identifying a Thumbprint

 

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

 

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

 

Method Summary
static void addResolver(WSSKeyIdentifierResolver resolver)
          Register a X509KeyIdentifierResolver instance for use in key identifier resolver operations.
protected  java.lang.String getDefaultEncodingType()
          Return the default encoding type of key identifier.
 java.lang.String getEncodingType()
          Get the encoding type of key identifier.
 java.lang.Object getKey()
          Returns the key (symmetric or asymmetric) corresponding to the underlying WSS SecurityToken.
 oracle.security.xmlsec.util.QName getName()
          Get the name of the security token reference.
static java.util.List getResolvers()
          Get the registered X509KeyIdentifierResolvers.
 WSSecurityToken getSecurityToken()
          Returns the underlying WSS SecurityToken.
 byte[] getThumbprint()
          Return the Thumbprint bytes Normally this returns the value contained in this key identifier if the valueType is #ThumbprintSHA1.
 byte[] getValue()
          Get the key identifier value.
 java.lang.String getValueType()
          Get the type of key identifier.
 void setEncodingType(java.lang.String encType)
          Set the encoding type of key identifier.
 void setValue(byte[] value)
          Set the key identifier value.
 void setValueType(java.lang.String valType)
          Set the type of key identifier.

 

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

 

Methods inherited from interface oracle.security.xmlsec.wss.WSSecurityTokenReferenceType
getNode

 

Field Detail

vt_ThumbprintSHA1

public static final java.lang.String vt_ThumbprintSHA1
A KeyIdentifier ValueType identifying a Thumbprint
See Also:
Constant Field Values

Constructor Detail

WSSKeyIdentifier

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

WSSKeyIdentifier

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

WSSKeyIdentifier

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

WSSKeyIdentifier

public WSSKeyIdentifier(org.w3c.dom.Document owner,
                        java.lang.String valType)
Create a new WSSKeyIdentifier instance.
Parameters:
owner - A XML Document to be used as the owner document of this structure.
valType - The type of key identifier.

WSSKeyIdentifier

public WSSKeyIdentifier(org.w3c.dom.Document owner,
                        java.lang.String valType,
                        java.lang.String encType)
Create a new WSSKeyIdentifier instance.
Parameters:
owner - A XML Document to be used as the owner document of this structure.
valType - The type of key identifier.
encType - The encoding type of key identifier .

Method Detail

setValueType

public void setValueType(java.lang.String valType)
Set the type of key identifier.
Parameters:
valType - The key identifier value type.

getValueType

public java.lang.String getValueType()
Get the type of key identifier.
Returns:
The key identifier value type.

setEncodingType

public void setEncodingType(java.lang.String encType)
Set the encoding type of key identifier.
Parameters:
encType - The key identifier encoding type.

getEncodingType

public java.lang.String getEncodingType()
Get the encoding type of key identifier.
Returns:
The key identifier encoding type.

getDefaultEncodingType

protected java.lang.String getDefaultEncodingType()
Return the default encoding type of key identifier.

This is necessary to handle messages that do not contain the EncodingType attribute.

Returns:
The key identifier's default encoding type.

setValue

public void setValue(byte[] value)
Set the key identifier value.

The identifier bytes will be encoded.

Parameters:
value - The key identifier bytes.

getValue

public byte[] getValue()
Get the key identifier value.
Returns:
The key identifier bytes.

getName

public oracle.security.xmlsec.util.QName getName()
Get the name of the security token reference.
Specified by:
getName in interface WSSecurityTokenReferenceType
Returns:
The QName of the security token reference type.

getThumbprint

public byte[] getThumbprint()
Return the Thumbprint bytes Normally this returns the value contained in this key identifier if the valueType is #ThumbprintSHA1. However concrete implementations of WSSKeyIdentifier may override this. Ie. for x509 key identifier, the thumbprint is stored with a valuetype of #x509ThumbprintSHA1
Returns:
the thumbprint bytes

addResolver

public static void addResolver(WSSKeyIdentifierResolver resolver)
Register a X509KeyIdentifierResolver instance for use in key identifier resolver operations.
Parameters:
resolver - The X.509 key identifier resolver.

getResolvers

public static java.util.List getResolvers()
Get the registered X509KeyIdentifierResolvers.
Returns:
The List of registered X.509 key identifier resolvers.

getKey

public java.lang.Object getKey()
                        throws WSSException
Description copied from interface: WSSecurityTokenReferenceType
Returns the key (symmetric or asymmetric) corresponding to the underlying WSS SecurityToken.
Specified by:
getKey in interface WSSecurityTokenReferenceType
Returns:
The Key.
Throws:
WSSException

getSecurityToken

public WSSecurityToken getSecurityToken()
                                 throws WSSException
Description copied from interface: WSSecurityTokenReferenceType
Returns the underlying WSS SecurityToken.
Specified by:
getSecurityToken in interface WSSecurityTokenReferenceType
Returns:
The underlying WSSecurityToken.
Throws:
WSSException

Skip navigation links

Oracle Security Developer Tools Web Services Security Java API Reference
11g (11.1.1)

E10678-02


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