org.apache.ws.sandbox.security.conversation
Class ConversationUtil

java.lang.Object
  extended byorg.apache.ws.sandbox.security.conversation.ConversationUtil

public class ConversationUtil
extends java.lang.Object


Constructor Summary
ConversationUtil()
           
 
Method Summary
static java.lang.String generateIdentifier(java.lang.String uuid, java.lang.String derivedKeyTokenId)
          This generates the identifier string using the uuig and the nonce
static java.lang.String generateNonce(int length)
          Genearets the nonce for a given bit length.
static java.lang.String generateUuid()
           
static java.lang.String genericID()
          Method genericID
static java.lang.String getDerivedKeyTokenId(java.lang.String identifier)
           
static SecurityContextToken getSCT(DerivedKeyToken dkToken)
          The method takes in a DerivedKetToken and returns the uuid of the corresponding SCT.
static java.lang.String getUuid(java.lang.String identifier)
           
static java.lang.String[] getUuidAndDerivedKeyTokenId(java.lang.String identifier)
          This extracts the Uuid and the DerivedKeyTokenId from the identifier sent in
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversationUtil

public ConversationUtil()
Method Detail

generateNonce

public static java.lang.String generateNonce(int length)
Genearets the nonce for a given bit length.


getDerivedKeyTokenId

public static java.lang.String getDerivedKeyTokenId(java.lang.String identifier)
Parameters:
identifier -
Returns:
See Also:
getUuidAndDerivedKeyTokenId()

getUuid

public static java.lang.String getUuid(java.lang.String identifier)
Parameters:
identifier -
Returns:
See Also:
getUuidAndDerivedKeyTokenId()

getUuidAndDerivedKeyTokenId

public static java.lang.String[] getUuidAndDerivedKeyTokenId(java.lang.String identifier)
This extracts the Uuid and the DerivedKeyTokenId from the identifier sent in

Parameters:
identifier - The identifier in uuid[ConvUtil.ID_SEPARATOR]nonce format
Returns:
A String arrasy of size 2 with uuid as the forst character and the nonce as the second

generateIdentifier

public static java.lang.String generateIdentifier(java.lang.String uuid,
                                                  java.lang.String derivedKeyTokenId)
This generates the identifier string using the uuig and the nonce

Parameters:
uuid - The uuid
Returns:
generated identifier string

generateUuid

public static java.lang.String generateUuid()

genericID

public static java.lang.String genericID()
Method genericID

Returns:

getSCT

public static SecurityContextToken getSCT(DerivedKeyToken dkToken)
                                   throws ConversationException
The method takes in a DerivedKetToken and returns the uuid of the corresponding SCT. There can be serveral cases. Case 1: If there is only one SCT in the owner docuemter it is the corresponding SCT Case 2: If there are two resolve them by Id Case 3: The corresponding SCT can be mentioned in properties as well.

Parameters:
dkToken -
Returns:
Throws:
ConversationException


Copyright © 2004-2008 Apache Web Services. All Rights Reserved.