none
WS-Security UsernameToken ID versus SecurityToken ID RRS feed

  • Question

  • Hello.  I want to create a WS- security UsernameToken such as

    <wsse:UsernameToken wsu:Id="UsernameToken-8568D1F5DDBEE2D24A15462391422345">

    I found an example of how to do so using the Microsoft.WebServices3 namespace.

    Microsoft.Web.Services3.Security.Tokens.UsernameToken token = new UsernameToken(username, password, PasswordOption.SendPlainText);

    writer.WriteStartElement("wsse", "UsernameToken",Namespace);
    writer.WriteAttributeString("wsu:Id", token.id);

    However, the resulting payload looks like this:

    <wsse:UsernameToken wsu:Id="SecurityToken-a2a0ad58-4c3d-46b0-b856-e6221f7694c9">

    How do I get it to say UsernameToken instead of Security Token?  Or, doesn't it matter?

    Thanks!!!

    Tuesday, January 29, 2019 10:23 PM

All replies