Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The core thing is to define prefixes for namespaces and use them to fortify each and every tag - you are mixing 3 namespaces and that just doesn't fly by trying to hack defaults. It's also good to use exactly the prefixes used in the <a href="http://www.oasis-open.org/committees/download.php/16782/wss-v1.1-spec-os-UsernameTokenProfile.pdf" rel="noreferrer">standard do</a>c - just in case that the other side get a little sloppy.</p> <p>Last but not least, it's much better to use default types for fields whenever you can - so for password you have to list the type, for the Nonce it's already Base64.</p> <p>Make sure that you check that the generated token is correct before you send it via XML and don't forget that the content of wsse:Password is Base64( SHA-1 (nonce + created + password) ) and date-time in wsu:Created can easily mess you up. So once you fix prefixes and namespaces and verify that yout SHA-1 work fine without XML (just imagine you are validating the request and do the server side of SHA-1 calculation) you can also do a truial wihtout Created and even without Nonce. Oh and Nonce can have different encodings so if you really want to force another encoding you'll have to look further into wsu namespace. </p> <pre><code>&lt;S11:Envelope xmlns:S11="..." xmlns:wsse="..." xmlns:wsu= "..."&gt; &lt;S11:Header&gt; ... &lt;wsse:Security&gt; &lt;wsse:UsernameToken&gt; &lt;wsse:Username&gt;NNK&lt;/wsse:Username&gt; &lt;wsse:Password Type="...#PasswordDigest"&gt;weYI3nXd8LjMNVksCKFV8t3rgHh3Rw==&lt;/wsse:Password&gt; &lt;wsse:Nonce&gt;WScqanjCEAC4mQoBE07sAQ==&lt;/wsse:Nonce&gt; &lt;wsu:Created&gt;2003-07-16T01:24:32&lt;/wsu:Created&gt; &lt;/wsse:UsernameToken&gt; &lt;/wsse:Security&gt; ... &lt;/S11:Header&gt; ... &lt;/S11:Envelope&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload