Package org.apache.wss4j.dom.message
Class WSSecSAMLToken
java.lang.Object
org.apache.wss4j.dom.message.WSSecBase
org.apache.wss4j.dom.message.WSSecSAMLToken
Builds a WS SAML Assertion and inserts it into the SOAP Envelope. Refer to
the WS specification, SAML Token profile
-
Field Summary
Fields inherited from class org.apache.wss4j.dom.message.WSSecBase
addWSUNamespace, attachmentCallbackHandler, callbackLookup, expandXopInclude, keyIdentifierType, password, storeBytesInAttachment, user -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(SamlAssertionWrapper samlAssertion) Adds a newSAMLAssertionto a soap envelope.getId()Get the id generated duringprepare().voidprepare(SamlAssertionWrapper samlAssertion) Creates a SAML token.voidPrepends the SAML Assertion to the elements already in the Security header.Methods inherited from class org.apache.wss4j.dom.message.WSSecBase
clean, getDocument, getIdAllocator, getKeyIdentifierType, getParts, getSecurityHeader, getWsDocInfo, isExpandXopInclude, setAttachmentCallbackHandler, setBodyID, setCallbackLookup, setExpandXopInclude, setIdAllocator, setKeyIdentifierType, setStoreBytesInAttachment, setUserInfo, setWsDocInfo, setWsuId
-
Constructor Details
-
WSSecSAMLToken
-
WSSecSAMLToken
-
-
Method Details
-
prepare
Creates a SAML token. The method prepares and initializes a WSSec UsernameToken structure after the relevant information was set. A Before callingprepare()all parameters such as user, password, passwordType etc. must be set. A completeUsernameTokenis constructed. -
prependToHeader
public void prependToHeader()Prepends the SAML Assertion to the elements already in the Security header. The method can be called any time afterprepare(). This allows to insert the SAML assertion at any position in the Security header. -
getElement
- Throws:
WSSecurityException
-
getId
Get the id generated duringprepare(). Returns the the value of wsu:Id attribute of this Timestamp.- Returns:
- Return the wsu:Id of this token or null if
prepareToken()was not called before.
-
build
Adds a newSAMLAssertionto a soap envelope. A completeSAMLAssertionis added to thewsse:Securityheader.- Parameters:
samlAssertion- TODO- Returns:
- Document with UsernameToken added
-