public class WSSecBase extends Object
Modifier and Type | Field and Description |
---|---|
protected CallbackHandler |
attachmentCallbackHandler |
protected CallbackLookup |
callbackLookup |
protected boolean |
expandXopInclude |
protected int |
keyIdentifierType |
protected String |
password |
protected boolean |
storeBytesInAttachment |
protected String |
user |
Constructor and Description |
---|
WSSecBase(Document doc) |
WSSecBase(WSSecHeader securityHeader) |
Modifier and Type | Method and Description |
---|---|
protected Document |
getDocument() |
WsuIdAllocator |
getIdAllocator() |
int |
getKeyIdentifierType()
Gets the value of the
keyIdentifierType . |
List<WSEncryptionPart> |
getParts()
Get which parts of the message to encrypt/sign.
|
WSSecHeader |
getSecurityHeader() |
WSDocInfo |
getWsDocInfo() |
boolean |
isExpandXopInclude() |
void |
setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler) |
protected String |
setBodyID(Document doc)
Looks up or adds a body id.
|
void |
setCallbackLookup(CallbackLookup callbackLookup) |
void |
setExpandXopInclude(boolean expandXopInclude) |
void |
setIdAllocator(WsuIdAllocator idAllocator) |
void |
setKeyIdentifierType(int keyIdType)
Sets which key identifier to use.
|
void |
setStoreBytesInAttachment(boolean storeBytesInAttachment) |
void |
setUserInfo(String user,
String password)
Set the user and password info.
|
void |
setWsDocInfo(WSDocInfo wsDocInfo) |
protected String |
setWsuId(Element bodyElement) |
protected String user
protected String password
protected int keyIdentifierType
protected CallbackLookup callbackLookup
protected CallbackHandler attachmentCallbackHandler
protected boolean storeBytesInAttachment
protected boolean expandXopInclude
public WSSecBase(WSSecHeader securityHeader)
public WSSecBase(Document doc)
protected Document getDocument()
public WSSecHeader getSecurityHeader()
public void setCallbackLookup(CallbackLookup callbackLookup)
callbackLookup
- The CallbackLookup object to retrieve elementspublic List<WSEncryptionPart> getParts()
public void setKeyIdentifierType(int keyIdType)
method
or
the method
function to
set up the key identification elements.keyIdType
- WSConstants.ISSUER_SERIAL
,
WSConstants.BST_DIRECT_REFERENCE
,
WSConstants.X509_KEY_IDENTIFIER
,
WSConstants.THUMBPRINT_IDENTIFIER
,
WSConstants.SKI_KEY_IDENTIFIER
,
WSConstants.KEY_VALUE
public int getKeyIdentifierType()
keyIdentifierType
.keyIdentifyerType
.WSConstants.ISSUER_SERIAL
,
WSConstants.BST_DIRECT_REFERENCE
,
WSConstants.X509_KEY_IDENTIFIER
,
WSConstants.SKI_KEY_IDENTIFIER
public void setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler)
public void setStoreBytesInAttachment(boolean storeBytesInAttachment)
protected String setBodyID(Document doc) throws Exception
wsu:Id
in the SOAP body element. If one is found, the
value of the wsu:Id
attribute is returned. Otherwise the
method generates a new wsu:Id
and an appropriate value.doc
- The SOAP envelope as Document
wsu:Id
attribute of the SOAP bodyException
public void setUserInfo(String user, String password)
user
- This is the user's alias name in the keystore that identifies
the private key to sign the documentpassword
- The user's password to get the private signing key from the
keystorepublic WsuIdAllocator getIdAllocator()
public void setIdAllocator(WsuIdAllocator idAllocator)
public boolean isExpandXopInclude()
public void setExpandXopInclude(boolean expandXopInclude)
public WSDocInfo getWsDocInfo()
public void setWsDocInfo(WSDocInfo wsDocInfo)
Copyright © 2019 JBoss by Red Hat. All rights reserved.