Oracle Security Developer Tools Web Services Security Java API Reference
10g (10.1.4.0.1)

B28177-01


oracle.security.xmlsec.wss.util
Class WSSTokenUtils

java.lang.Object
  extended byoracle.security.xmlsec.wss.util.WSSTokenUtils


public class WSSTokenUtils
extends java.lang.Object

Utility class containing static methods for working with WSS Token elements and structures.


Constructor Summary
WSSTokenUtils()
          Create a new UsernameToken instance.

 

Method Summary
static BinaryDataEncoder createBinaryDataEncoder(java.lang.String encTypeURI)
          Create a new BinaryDataEncoder instance.
static WSSBinarySecurityToken createBinarySecurityToken(java.lang.String wsuId, java.lang.String valType, java.lang.String encType, byte[] value)
          Create a new BinarySecurityToken instance.
static WSUCreated createCreated(java.util.Date created)
          Create a new Created instance.
static WSUCreated createCreated(java.util.Date created, java.lang.String valType)
          Create a new Created instance.
static WSSEmbedded createEmbedded(java.lang.String wsuId, WSSecurityToken token)
          Create a new Embedded instance.
static WSUExpires createExpires(java.util.Date expires)
          Create a new Expires instance.
static WSUExpires createExpires(java.util.Date expires, java.lang.String valType)
          Create a new Expires instance.
static WSSKeyIdentifier createKeyIdentifier(java.lang.String wsuId, java.lang.String valTypeURI, java.lang.String encTypeURI, byte[] value)
          Create a new KeyIdentifier instance.
static WSSReference createReference(java.lang.String uri)
          Create a new Reference instance.
static WSSReference createReference(java.lang.String uri, java.lang.String valTypeURI)
          Create a new Reference instance.
static WSSecurityToken createSecurityToken(org.w3c.dom.Element token)
          Create a new SecurityToken instance.
static WSSecurityTokenReference createSecurityTokenReference(java.lang.String wsuId, WSSecurityTokenReferenceType stRef)
          Create a new SecurityTokenReference instance.
static WSSecurityTokenReference createSecurityTokenReference(java.lang.String wsuId, WSSecurityTokenReferenceType stRef, java.lang.String usage)
          Create a new SecurityTokenReference instance.
static TimeDataEncoder createTimeDataEncoder(java.lang.String valTypeURI)
          Create a new BinaryDataEncoder instance.
static WSUTimestamp createTimestamp(java.lang.String wsuId, WSUCreated created, WSUExpires expires)
          Create a new Timestamp instance.
static UsernameToken createUsernameToken(java.lang.String wsuId, java.lang.String username)
          Create a new UsernameToken instance.
static UsernameToken createUsernameToken(java.lang.String wsuId, java.lang.String username, byte[] nonce, java.lang.String nonceEncType, WSUCreated created, char[] password, java.lang.String passwdType)
          Create a new UsernameToken instance.
static UsernameToken createUsernameToken(java.lang.String wsuId, java.lang.String username, byte[] nonce, WSUCreated created, char[] passwd)
          Create a new UsernameToken instance.
static X509BinarySecurityToken createX509BinarySecurityToken(java.lang.String wsuId, oracle.security.crypto.cert.X509 cert)
          Create a new X.509 BinarySecurityToken instance.
static byte[] getKeyIdentifier(KerberosBinarySecurityToken kst)
          Computes the KeyIdentifier for referencing Kerberos Tokens

 

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

 

Constructor Detail

WSSTokenUtils

public WSSTokenUtils()
Create a new UsernameToken instance.

Method Detail

createUsernameToken

public static UsernameToken createUsernameToken(java.lang.String wsuId,
                                                java.lang.String username)
Create a new UsernameToken instance.
Parameters:
wsuId - The token identifier.
username - The token identifier.
Returns:
The resulting UsernameToken.

createUsernameToken

public static UsernameToken createUsernameToken(java.lang.String wsuId,
                                                java.lang.String username,
                                                byte[] nonce,
                                                WSUCreated created,
                                                char[] passwd)
Create a new UsernameToken instance.
Parameters:
wsuId - The token identifier.
username - The token identifier.
nonce - The nonce value.
created - The creation timestamp.
passwd - The password bytes.
Returns:
The resulting UsernameToken.

createUsernameToken

public static UsernameToken createUsernameToken(java.lang.String wsuId,
                                                java.lang.String username,
                                                byte[] nonce,
                                                java.lang.String nonceEncType,
                                                WSUCreated created,
                                                char[] password,
                                                java.lang.String passwdType)
Create a new UsernameToken instance.
Parameters:
wsuId - The token identifier.
username - The token identifier.
nonce - The nonce value.
nonceEncType - The nonce encoding type.
created - The creation timestamp.
password - The password bytes.
passwdType - The password type.
Returns:
The resulting UsernameToken.

createX509BinarySecurityToken

public static X509BinarySecurityToken createX509BinarySecurityToken(java.lang.String wsuId,
                                                                    oracle.security.crypto.cert.X509 cert)
Create a new X.509 BinarySecurityToken instance.
Parameters:
wsuId - The token identifier.
cert - The token content.
Returns:
The resulting X509BinarySecurityToken.

createCreated

public static WSUCreated createCreated(java.util.Date created)
Create a new Created instance.
Parameters:
created - The creation timestamp.
Returns:
The resulting WSUCreated.

createCreated

public static WSUCreated createCreated(java.util.Date created,
                                       java.lang.String valType)
Create a new Created instance.
Parameters:
created - The creation timestamp.
valType - The timestamp encoding type.
Returns:
The resulting WSUCreated.

createExpires

public static WSUExpires createExpires(java.util.Date expires)
Create a new Expires instance.
Parameters:
expires - The expiration timestamp.
Returns:
The resulting WSUExpires.

createExpires

public static WSUExpires createExpires(java.util.Date expires,
                                       java.lang.String valType)
Create a new Expires instance.
Parameters:
expires - The expiration timestamp.
valType - The timestamp encoding type.
Returns:
The resulting WSUExpires.

createTimestamp

public static WSUTimestamp createTimestamp(java.lang.String wsuId,
                                           WSUCreated created,
                                           WSUExpires expires)
Create a new Timestamp instance.
Parameters:
wsuId - The timestamp identifier.
created - The creation timestamp.
expires - The expiration timestamp.
Returns:
The resulting WSUTimestamp.

createEmbedded

public static WSSEmbedded createEmbedded(java.lang.String wsuId,
                                         WSSecurityToken token)
Create a new Embedded instance.
Parameters:
wsuId - The global identifier.
token - The security token to embed.
Returns:
The resulting WSSEmbedded token reference.

createSecurityTokenReference

public static WSSecurityTokenReference createSecurityTokenReference(java.lang.String wsuId,
                                                                    WSSecurityTokenReferenceType stRef)
Create a new SecurityTokenReference instance.
Parameters:
wsuId - The wsu identifier value.
stRef - The WSSecurityTokenReferenceType object.
Returns:
The resulting WSSecurityTokenReference.

createSecurityTokenReference

public static WSSecurityTokenReference createSecurityTokenReference(java.lang.String wsuId,
                                                                    WSSecurityTokenReferenceType stRef,
                                                                    java.lang.String usage)
Create a new SecurityTokenReference instance.
Parameters:
wsuId - The wsu identifier.
stRef - The WSSecurityTokenReferenceType object.
usage - The Usage attribute value.
Returns:
The resulting WSSecurityTokenReference object.

createBinarySecurityToken

public static WSSBinarySecurityToken createBinarySecurityToken(java.lang.String wsuId,
                                                               java.lang.String valType,
                                                               java.lang.String encType,
                                                               byte[] value)
                                                        throws WSSException
Create a new BinarySecurityToken instance.
Parameters:
wsuId - The token identifier.
valType - The token value type.
encType - The token encoding type.
value - The raw token value bytes.
Returns:
The resulting BinarySecurityToken.
Throws:
WSSException

createSecurityToken

public static WSSecurityToken createSecurityToken(org.w3c.dom.Element token)
                                           throws WSSException
Create a new SecurityToken instance.
Parameters:
token - The element that conforms to the schema of a WSS security token.
Returns:
The resulting WSSecurityToken.
Throws:
WSSException

createReference

public static WSSReference createReference(java.lang.String uri)
                                    throws WSSException
Create a new Reference instance.
Parameters:
uri - The reference target.
Returns:
The resulting direct reference.
Throws:
WSSException

createReference

public static WSSReference createReference(java.lang.String uri,
                                           java.lang.String valTypeURI)
                                    throws WSSException
Create a new Reference instance.
Parameters:
uri - The reference target.
valTypeURI - The reference value type URI.
Returns:
The resulting direct reference.
Throws:
WSSException

createKeyIdentifier

public static WSSKeyIdentifier createKeyIdentifier(java.lang.String wsuId,
                                                   java.lang.String valTypeURI,
                                                   java.lang.String encTypeURI,
                                                   byte[] value)
                                            throws WSSException
Create a new KeyIdentifier instance.
Parameters:
wsuId - The wsu identifier.
valTypeURI - The identifier value type URI.
encTypeURI - The identifier encoding value type URI.
value - The raw identifier value bytes.
Returns:
The resulting key identifier.
Throws:
WSSException

createBinaryDataEncoder

public static BinaryDataEncoder createBinaryDataEncoder(java.lang.String encTypeURI)
Create a new BinaryDataEncoder instance.
Parameters:
encTypeURI - The encoding value type URI.
Returns:
The encoder instance.

createTimeDataEncoder

public static TimeDataEncoder createTimeDataEncoder(java.lang.String valTypeURI)
Create a new BinaryDataEncoder instance.
Parameters:
valTypeURI - The encoding value type URI.
Returns:
The encoder instance.

getKeyIdentifier

public static byte[] getKeyIdentifier(KerberosBinarySecurityToken kst)
Computes the KeyIdentifier for referencing Kerberos Tokens
Parameters:
kst - The Kerberos security token.

Oracle Security Developer Tools Web Services Security Java API Reference
10g (10.1.4.0.1)

B28177-01


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