org.apache.ws.security.processor
Class ReferenceListProcessor
java.lang.Object
org.apache.ws.security.processor.ReferenceListProcessor
- All Implemented Interfaces:
- Processor
public class ReferenceListProcessor
- extends java.lang.Object
- implements Processor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReferenceListProcessor
public ReferenceListProcessor()
handleToken
public java.util.List<WSSecurityEngineResult> handleToken(org.w3c.dom.Element elem,
RequestData data,
WSDocInfo wsDocInfo)
throws WSSecurityException
- Specified by:
handleToken
in interface Processor
- Throws:
WSSecurityException
findEncryptedDataElement
public static org.w3c.dom.Element findEncryptedDataElement(org.w3c.dom.Document doc,
WSDocInfo wsDocInfo,
java.lang.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 EncryptedDatawsDocInfo
- The WSDocInfo object to usedataRefURI
- 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(org.w3c.dom.Document doc,
java.lang.String dataRefURI,
org.w3c.dom.Element encData,
javax.crypto.SecretKey symmetricKey,
java.lang.String symEncAlgo)
throws WSSecurityException
- Decrypt the EncryptedData argument using a SecretKey.
- Parameters:
doc
- The (document) owner of EncryptedDatadataRefURI
- The URI of EncryptedDataencData
- The EncryptedData elementsymmetricKey
- The SecretKey with which to decrypt EncryptedDatasymEncAlgo
- The symmetric encryption algorithm to use
- Throws:
WSSecurityException
getId
public java.lang.String getId()
getXPath
public static java.lang.String getXPath(org.w3c.dom.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-2011 The Apache Software Foundation. All Rights Reserved.