Oracle Security Developer Tools Web Services Security Java API Reference
10g Release 2 (10.1.2.0.2)

B15570-01


oracle.security.xmlsec.wss.x509
Class X509BinarySecurityToken

java.lang.Object
  extended byoracle.security.xmlsec.util.XMLNode
      extended byoracle.security.xmlsec.util.XMLElement
          extended byoracle.security.xmlsec.wss.WSSElement
              extended byoracle.security.xmlsec.wss.WSSBinarySecurityToken
                  extended byoracle.security.xmlsec.wss.x509.X509BinarySecurityToken

All Implemented Interfaces:
WSSecurityToken

public class X509BinarySecurityToken
extends WSSBinarySecurityToken

This class represents a WSS Binary Security Token of type X509 certificate.

Note: Certificate Path (#X509PKIPathv1) and Set of Certificates and CRLs (#PKCS7) Token ValueTypes are not supported in this release.


Field Summary

Fields inherited from class oracle.security.xmlsec.wss.WSSBinarySecurityToken
DEFAULT_ENCODING_TYPE

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

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

Method Summary
boolean equals(oracle.security.crypto.cert.X509 x509Cert)
Checks if the X509 certificate stored in this structure is the same as the given one.
PublicKey getPublicKey()
Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
java.lang.Object getToken()
Get the token contents.
oracle.security.crypto.cert.X509 getX509Certificate()
Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
void setToken(java.lang.Object x509Cert)
Set the token contents.

Methods inherited from class oracle.security.xmlsec.wss.WSSBinarySecurityToken
getEncodingType, getTokenName, getValue, getValueType, setValue

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, 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.WSSecurityToken
getNode

Constructor Detail

X509BinarySecurityToken

public X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement)
Create a new X509BinarySecurityToken instance from the given XML element.
Parameters:
x509BSTElement - A X.509 Certificate token element.

X509BinarySecurityToken

public X509BinarySecurityToken(org.w3c.dom.Element x509BSTElement,
                               java.lang.String systemId)
Create a new X509BinarySecurityToken instance from the given XML element.
Parameters:
x509BSTElement - A X.509 Certificate token element.
systemId - The URI string system ID for this element.

X509BinarySecurityToken

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

X509BinarySecurityToken

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

Method Detail

setToken

public void setToken(java.lang.Object x509Cert)
Set the token contents.

Converts a oracle.security.crypto.cert.x509 object into a X.509v3 certificate token and calls WSSBinarySecurityContents.setValue().

Specified by:
setToken in class WSSBinarySecurityToken
Parameters:
x509Cert - The X.509 certificate.

getToken

public java.lang.Object getToken()
                          throws WSSException
Get the token contents.

Returns a oracle.security.crypto.cert.x509 object from the X.509v3 certificate token by calling WSSBinarySecurityContents.getValue().

Specified by:
getToken in interface WSSecurityToken
Specified by:
getToken in class WSSBinarySecurityToken
Returns:
The X.509 certificate.
Throws:
WSSException

getX509Certificate

public oracle.security.crypto.cert.X509 getX509Certificate()
                                                    throws WSSException
Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
Returns:
The X509 certificate or null.
Throws:
WSSException

getPublicKey

public PublicKey getPublicKey()
                       throws WSSException
Returns the Public Key contained in the X.509 Certificate Token of ValueType #X509v3.
Returns:
The PublicKey certificate or null.
Throws:
WSSException

equals

public boolean equals(oracle.security.crypto.cert.X509 x509Cert)
Checks if the X509 certificate stored in this structure is the same as the given one.
Parameters:
x509Cert - The certificate token to compare.
Returns:
true if the X.509 encodings match or false otherwise.

Oracle Security Developer Tools Web Services Security Java API Reference
10g Release 2 (10.1.2.0.2)

B15570-01


Copyright © 2005 , Oracle. All rights reserved.