Class WSSecSAMLToken

  • public class WSSecSAMLToken
    extends WSSecBase
    Builds a WS SAML Assertion and inserts it into the SOAP Envelope. Refer to the WS specification, SAML Token profile
    • Constructor Detail

      • WSSecSAMLToken

        public WSSecSAMLToken​(WSSecHeader securityHeader)
      • WSSecSAMLToken

        public WSSecSAMLToken​(Document doc)
    • Method Detail

      • prepare

        public void prepare​(SamlAssertionWrapper samlAssertion)
        Creates a SAML token. The method prepares and initializes a WSSec UsernameToken structure after the relevant information was set. A Before calling prepare() all parameters such as user, password, passwordType etc. must be set. A complete UsernameToken is constructed.
      • prependToHeader

        public void prependToHeader()
        Prepends the SAML Assertion to the elements already in the Security header. The method can be called any time after prepare(). This allows to insert the SAML assertion at any position in the Security header.
      • getId

        public String getId()
        Get the id generated during prepare(). Returns the the value of wsu:Id attribute of this Timestamp.
        Return the wsu:Id of this token or null if prepareToken() was not called before.
      • build

        public Document build​(SamlAssertionWrapper samlAssertion)
        Adds a new SAMLAssertion to a soap envelope.

        A complete SAMLAssertion is added to the wsse:Security header.

        samlAssertion - TODO
        Document with UsernameToken added