org.apache.wss4j.stax.ext
Class WSSUtils
java.lang.Object
org.apache.xml.security.stax.ext.XMLSecurityUtils
org.apache.wss4j.stax.ext.WSSUtils
public class WSSUtils
- extends org.apache.xml.security.stax.ext.XMLSecurityUtils
|
Constructor Summary |
protected |
WSSUtils()
|
|
Method Summary |
static void |
createBinarySecurityTokenStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String referenceId,
X509Certificate[] x509Certificates,
boolean useSingleCertificate)
|
static void |
createBSTReferenceStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String referenceId,
String valueType,
boolean includedInMessage)
|
static void |
createEmbeddedKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType,
String referenceId)
|
static void |
createEncryptedDataStructureForAttachments(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain)
|
static void |
createEncryptedKeySha1IdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
Key key)
|
static void |
createEncryptedKeySha1IdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String identifier)
|
static void |
createKerberosSha1IdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String identifier)
|
static void |
createReferenceListStructureForEncryption(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain)
|
static void |
createSAMLKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType,
String referenceId)
|
static void |
createThumbprintKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static org.apache.xml.security.stax.securityEvent.TokenSecurityEvent<? extends org.apache.xml.security.stax.securityToken.InboundSecurityToken> |
createTokenSecurityEvent(org.apache.xml.security.stax.securityToken.InboundSecurityToken inboundSecurityToken,
String correlationID)
|
static void |
createUsernameTokenReferenceStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String tokenId)
|
static void |
createX509KeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static void |
createX509SubjectKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
|
static void |
doPasswordCallback(CallbackHandler callbackHandler,
Callback callback)
Executes the Callback handling. |
static String |
doPasswordDigest(byte[] nonce,
String created,
String password)
|
static void |
doSecretKeyCallback(CallbackHandler callbackHandler,
Callback callback,
String id)
Try to get the secret key from a CallbackHandler implementation |
static
<T extends org.apache.xml.security.stax.securityToken.SecurityToken>
T |
|
getRootToken(T securityToken)
|
static String |
getSOAPMessageVersionNamespace(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent)
|
static boolean |
isInSecurityHeader(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent,
List<QName> elementPath,
String actorOrRole)
|
static boolean |
isInSecurityHeader(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent,
String actorOrRole)
|
static boolean |
isInSOAPBody(List<QName> elementPath)
|
static boolean |
isInSOAPBody(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent)
|
static boolean |
isInSOAPHeader(List<QName> elementPath)
|
static boolean |
isInSOAPHeader(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent)
|
static boolean |
isResponsibleActorOrRole(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement,
String responsibleActor)
|
static boolean |
isSecurityHeaderElement(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent,
String actorOrRole)
|
static Schema |
loadWSSecuritySchemas()
|
static String |
pathAsString(List<QName> path)
|
static boolean |
pathMatches(List<QName> path1,
List<QName> path2,
boolean matchAnySoapNS,
boolean lastElementWildCard)
|
static void |
updateSecurityHeaderOrder(org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
QName headerElementName,
org.apache.xml.security.stax.ext.XMLSecurityConstants.Action action,
boolean onTop)
|
| Methods inherited from class org.apache.xml.security.stax.ext.XMLSecurityUtils |
copy, createKeyValueTokenStructure, createKeyValueTokenStructure, createX509CertificateStructure, createX509IssuerSerialStructure, createX509SubjectNameStructure, dropReferenceMarker, getExcC14NInclusiveNamespacePrefixes, getQNameAttribute, getQNameType, getTransformer, getType, getXMLEventAsString, loadXMLSecuritySchemas, prepareSecretKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WSSUtils
protected WSSUtils()
doPasswordCallback
public static void doPasswordCallback(CallbackHandler callbackHandler,
Callback callback)
throws WSSecurityException
- Executes the Callback handling. Typically used to fetch passwords
- Parameters:
callbackHandler - callback -
- Throws:
WSSecurityException - if the callback couldn't be executed
doSecretKeyCallback
public static void doSecretKeyCallback(CallbackHandler callbackHandler,
Callback callback,
String id)
throws WSSecurityException
- Try to get the secret key from a CallbackHandler implementation
- Parameters:
callbackHandler - a CallbackHandler implementation
- Throws:
WSSecurityException
doPasswordDigest
public static String doPasswordDigest(byte[] nonce,
String created,
String password)
throws WSSecurityException
- Throws:
WSSecurityException
getSOAPMessageVersionNamespace
public static String getSOAPMessageVersionNamespace(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent)
isInSOAPHeader
public static boolean isInSOAPHeader(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent)
isInSOAPHeader
public static boolean isInSOAPHeader(List<QName> elementPath)
isInSOAPBody
public static boolean isInSOAPBody(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent)
isInSOAPBody
public static boolean isInSOAPBody(List<QName> elementPath)
isInSecurityHeader
public static boolean isInSecurityHeader(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent,
String actorOrRole)
isInSecurityHeader
public static boolean isInSecurityHeader(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent,
List<QName> elementPath,
String actorOrRole)
isSecurityHeaderElement
public static boolean isSecurityHeaderElement(org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent,
String actorOrRole)
updateSecurityHeaderOrder
public static void updateSecurityHeaderOrder(org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
QName headerElementName,
org.apache.xml.security.stax.ext.XMLSecurityConstants.Action action,
boolean onTop)
isResponsibleActorOrRole
public static boolean isResponsibleActorOrRole(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement,
String responsibleActor)
createBinarySecurityTokenStructure
public static void createBinarySecurityTokenStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String referenceId,
X509Certificate[] x509Certificates,
boolean useSingleCertificate)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createX509SubjectKeyIdentifierStructure
public static void createX509SubjectKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws org.apache.xml.security.exceptions.XMLSecurityException,
XMLStreamException
- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
XMLStreamException
createX509KeyIdentifierStructure
public static void createX509KeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createThumbprintKeyIdentifierStructure
public static void createThumbprintKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
X509Certificate[] x509Certificates)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createEncryptedKeySha1IdentifierStructure
public static void createEncryptedKeySha1IdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
Key key)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createEncryptedKeySha1IdentifierStructure
public static void createEncryptedKeySha1IdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String identifier)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createKerberosSha1IdentifierStructure
public static void createKerberosSha1IdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String identifier)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createBSTReferenceStructure
public static void createBSTReferenceStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String referenceId,
String valueType,
boolean includedInMessage)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createEmbeddedKeyIdentifierStructure
public static void createEmbeddedKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType,
String referenceId)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createSAMLKeyIdentifierStructure
public static void createSAMLKeyIdentifierStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType,
String referenceId)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createUsernameTokenReferenceStructure
public static void createUsernameTokenReferenceStructure(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain,
String tokenId)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createReferenceListStructureForEncryption
public static void createReferenceListStructureForEncryption(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createEncryptedDataStructureForAttachments
public static void createEncryptedDataStructureForAttachments(org.apache.xml.security.stax.ext.AbstractOutputProcessor abstractOutputProcessor,
org.apache.xml.security.stax.ext.OutputProcessorChain outputProcessorChain)
throws XMLStreamException,
org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
XMLStreamException
org.apache.xml.security.exceptions.XMLSecurityException
createTokenSecurityEvent
public static org.apache.xml.security.stax.securityEvent.TokenSecurityEvent<? extends org.apache.xml.security.stax.securityToken.InboundSecurityToken> createTokenSecurityEvent(org.apache.xml.security.stax.securityToken.InboundSecurityToken inboundSecurityToken,
String correlationID)
throws WSSecurityException
- Throws:
WSSecurityException
pathMatches
public static boolean pathMatches(List<QName> path1,
List<QName> path2,
boolean matchAnySoapNS,
boolean lastElementWildCard)
pathAsString
public static String pathAsString(List<QName> path)
getRootToken
public static <T extends org.apache.xml.security.stax.securityToken.SecurityToken> T getRootToken(T securityToken)
throws org.apache.xml.security.exceptions.XMLSecurityException
- Throws:
org.apache.xml.security.exceptions.XMLSecurityException
loadWSSecuritySchemas
public static Schema loadWSSecuritySchemas()
throws SAXException
- Throws:
SAXException
Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.