public class WSSecBase extends Object
Modifier and Type | Field and Description |
---|---|
protected CallbackHandler |
attachmentCallbackHandler |
protected CallbackLookup |
callbackLookup |
protected boolean |
doDebug |
protected int |
keyIdentifierType |
protected String |
password |
protected boolean |
storeBytesInAttachment |
protected String |
user |
Constructor and Description |
---|
WSSecBase() |
Modifier and Type | Method and Description |
---|---|
WsuIdAllocator |
getIdAllocator() |
int |
getKeyIdentifierType()
Gets the value of the
keyIdentifierType . |
List<WSEncryptionPart> |
getParts()
Get which parts of the message to encrypt/sign.
|
void |
setAttachmentCallbackHandler(CallbackHandler attachmentCallbackHandler) |
protected String |
setBodyID(Document doc)
Looks up or adds a body id.
|
void |
setCallbackLookup(CallbackLookup callbackLookup) |
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.
|
protected String |
setWsuId(Element bodyElement) |
protected String user
protected String password
protected int keyIdentifierType
protected boolean doDebug
protected CallbackLookup callbackLookup
protected CallbackHandler attachmentCallbackHandler
protected boolean storeBytesInAttachment
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)
Copyright © 2016 JBoss by Red Hat. All rights reserved.