public class WSSecSignatureSAML extends WSSecSignature
bstToken, c14nMethod, certUri, keyInfo, keyInfoUri, secretKey, sig, signatureFactory, signatureValue, strUri
attachmentCallbackHandler, callbackLookup, expandXopInclude, keyIdentifierType, password, storeBytesInAttachment, user
Constructor and Description |
---|
WSSecSignatureSAML(Document doc) |
WSSecSignatureSAML(WSSecHeader securityHeader)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Document |
build(Crypto uCrypto,
SamlAssertionWrapper samlAssertion,
Crypto iCrypto,
String iKeyName,
String iKeyPW)
Builds a signed soap envelope with SAML token.
|
void |
computeSignature(List<Reference> referenceList,
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(Crypto uCrypto,
SamlAssertionWrapper samlAssertion,
Crypto iCrypto,
String iKeyName,
String iKeyPW)
Initialize a WSSec SAML Signature.
|
void |
prependSAMLElementsToHeader()
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, getCustomKeyInfoElement, getCustomTokenId, getDigestAlgo, getId, getKeyInfoElement, getSecurityTokenReference, getSecurityTokenReferenceURI, getSigCanonicalization, getSignatureAlgorithm, getSignatureElement, getSignatureValue, isAddInclusivePrefixes, isIncludeSignatureToken, isUseSingleCertificate, marshalKeyInfo, prepare, prependBSTElementToHeader, setAddInclusivePrefixes, setCustomKeyInfoElement, setCustomTokenId, setCustomTokenValueType, setDigestAlgo, setEncrKeySha1value, setIncludeSignatureToken, setSecretKey, setSecurityTokenReference, setSigCanonicalization, setSignatureAlgorithm, setUseSingleCertificate, setX509Certificate
addReferencesToSign, cleanup, createSTRParameter, getInclusivePrefixes, getInclusivePrefixes
getDocument, getIdAllocator, getKeyIdentifierType, getParts, getSecurityHeader, getWsDocInfo, isExpandXopInclude, setAttachmentCallbackHandler, setBodyID, setCallbackLookup, setExpandXopInclude, setIdAllocator, setKeyIdentifierType, setStoreBytesInAttachment, setUserInfo, setWsDocInfo, setWsuId
public WSSecSignatureSAML(WSSecHeader securityHeader)
public WSSecSignatureSAML(Document doc)
public Document build(Crypto uCrypto, SamlAssertionWrapper samlAssertion, Crypto iCrypto, String iKeyName, String iKeyPW) throws WSSecurityException
wsse:Signature
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 keyDocument
WSSecurityException
public void prepare(Crypto uCrypto, SamlAssertionWrapper samlAssertion, Crypto iCrypto, String iKeyName, String iKeyPW) throws WSSecurityException
prependSignatureElementToHeader()
method.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 keyWSSecurityException
public void prependSAMLElementsToHeader()
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,public void computeSignature(List<Reference> referenceList, 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 © 2019 JBoss by Red Hat. All rights reserved.