public class WSSecSignatureSAML extends WSSecSignature
bstToken, c14nMethod, certUri, document, keyInfo, keyInfoUri, secretKey, sig, signatureFactory, signatureValue, strUri, wsDocInfo
attachmentCallbackHandler, callbackLookup, doDebug, keyIdentifierType, password, storeBytesInAttachment, user
Constructor and Description |
---|
WSSecSignatureSAML()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Document |
build(Document doc,
Crypto uCrypto,
SamlAssertionWrapper samlAssertion,
Crypto iCrypto,
String iKeyName,
String iKeyPW,
WSSecHeader secHeader)
Builds a signed soap envelope with SAML token.
|
void |
computeSignature(List<Reference> referenceList,
WSSecHeader secHeader,
Element siblingElement)
Compute the Signature over the references.
|
boolean |
isUseDirectReferenceToAssertion()
Return whether a Direct Reference is to be used to reference the assertion.
|
void |
prepare(Document doc,
Crypto uCrypto,
SamlAssertionWrapper samlAssertion,
Crypto iCrypto,
String iKeyName,
String iKeyPW,
WSSecHeader secHeader)
Initialize a WSSec SAML Signature.
|
void |
prependSAMLElementsToHeader(WSSecHeader secHeader)
Prepend the SAML elements to the elements already in the Security header.
|
void |
setUseDirectReferenceToAssertion(boolean useDirectReferenceToAssertion)
Set whether a Direct Reference is to be used to reference the assertion.
|
addReferencesToSign, appendBSTElementToHeader, build, computeSignature, computeSignature, getBinarySecurityTokenElement, getBSTTokenId, getDigestAlgo, getId, getSecurityTokenReference, getSecurityTokenReferenceURI, getSigCanonicalization, getSignatureAlgorithm, getSignatureElement, getSignatureValue, isAddInclusivePrefixes, isIncludeSignatureToken, isUseSingleCertificate, prepare, prependBSTElementToHeader, setAddInclusivePrefixes, setCustomTokenId, setCustomTokenValueType, setDigestAlgo, setEncrKeySha1value, setIncludeSignatureToken, setSecretKey, setSecurityTokenReference, setSigCanonicalization, setSignatureAlgorithm, setUseSingleCertificate, setX509Certificate
addReferencesToSign, createSTRParameter, getInclusivePrefixes, getInclusivePrefixes
getIdAllocator, getKeyIdentifierType, getParts, setAttachmentCallbackHandler, setBodyID, setCallbackLookup, setIdAllocator, setKeyIdentifierType, setStoreBytesInAttachment, setUserInfo, setWsuId
public Document build(Document doc, Crypto uCrypto, SamlAssertionWrapper samlAssertion, Crypto iCrypto, String iKeyName, String iKeyPW, WSSecHeader secHeader) throws WSSecurityException
wsse:Signature
doc
- The unsigned SOAP envelope as Document
uCrypto
- The user's Crypto instancesamlAssertion
- the complete SAML assertioniCrypto
- An instance of the Crypto API to handle keystore SAML token
issuer and to generate certificatesiKeyName
- Private key to use in case of "sender-Vouches"iKeyPW
- Password for issuer private keysecHeader
- The Security headerDocument
WSSecurityException
public void prepare(Document doc, Crypto uCrypto, SamlAssertionWrapper samlAssertion, Crypto iCrypto, String iKeyName, String iKeyPW, WSSecHeader secHeader) throws WSSecurityException
prependSignatureElementToHeader()
method.doc
- The SOAP envelope as Document
uCrypto
- The user's Crypto instancesamlAssertion
- the complete SAML assertioniCrypto
- An instance of the Crypto API to handle keystore SAML token
issuer and to generate certificatesiKeyName
- Private key to use in case of "sender-Vouches"iKeyPW
- Password for issuer private keysecHeader
- The Security headerWSSecurityException
public void prependSAMLElementsToHeader(WSSecHeader secHeader)
prepare()
. This
allows to insert the SAML elements at any position in the Security
header.
This methods first prepends the SAML security reference if mode is
senderVouches
, then the SAML token itself,secHeader
- The security header that holds the BST element.public void computeSignature(List<Reference> referenceList, WSSecHeader secHeader, Element siblingElement) throws WSSecurityException
addReferencesToSign()
.WSSecurityException
public boolean isUseDirectReferenceToAssertion()
public void setUseDirectReferenceToAssertion(boolean useDirectReferenceToAssertion)
useDirectReferenceToAssertion
- whether a Direct Reference is to be used
to reference the assertionCopyright © 2017 JBoss by Red Hat. All rights reserved.