org.apache.ws.security.processor
Class ReferenceListProcessor

java.lang.Object
  extended by org.apache.ws.security.processor.ReferenceListProcessor
All Implemented Interfaces:
Processor

public class ReferenceListProcessor
extends Object
implements Processor


Constructor Summary
ReferenceListProcessor()
           
 
Method Summary
static WSDataRef decryptEncryptedData(Document doc, String dataRefURI, Element encData, SecretKey symmetricKey, String symEncAlgo)
          Decrypt the EncryptedData argument using a SecretKey.
static Element findEncryptedDataElement(Document doc, WSDocInfo wsDocInfo, String dataRefURI)
          Look up the encrypted data.
 String getId()
           
static String getXPath(Node decryptedNode)
           
 List<WSSecurityEngineResult> handleToken(Element elem, RequestData data, WSDocInfo wsDocInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceListProcessor

public ReferenceListProcessor()
Method Detail

handleToken

public List<WSSecurityEngineResult> handleToken(Element elem,
                                                RequestData data,
                                                WSDocInfo wsDocInfo)
                                         throws WSSecurityException
Specified by:
handleToken in interface Processor
Throws:
WSSecurityException

findEncryptedDataElement

public static Element findEncryptedDataElement(Document doc,
                                               WSDocInfo wsDocInfo,
                                               String dataRefURI)
                                        throws WSSecurityException
Look up the encrypted data. First try Id="someURI". If no such Id then try wsu:Id="someURI".

Parameters:
doc - The document in which to find EncryptedData
wsDocInfo - The WSDocInfo object to use
dataRefURI - The URI of EncryptedData
Returns:
The EncryptedData element
Throws:
WSSecurityException - if the EncryptedData element referenced by dataRefURI is not found

decryptEncryptedData

public static WSDataRef decryptEncryptedData(Document doc,
                                             String dataRefURI,
                                             Element encData,
                                             SecretKey symmetricKey,
                                             String symEncAlgo)
                                      throws WSSecurityException
Decrypt the EncryptedData argument using a SecretKey.

Parameters:
doc - The (document) owner of EncryptedData
dataRefURI - The URI of EncryptedData
encData - The EncryptedData element
symmetricKey - The SecretKey with which to decrypt EncryptedData
symEncAlgo - The symmetric encryption algorithm to use
Throws:
WSSecurityException

getId

public String getId()

getXPath

public static String getXPath(Node decryptedNode)
Parameters:
decryptedNode - the decrypted node
Returns:
a fully built xpath (eg. "/soapenv:Envelope/soapenv:Body/ns:decryptedElement") if the decryptedNode is an Element or an Attr node and is not detached from the document. null otherwise


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.