Skip to content

UsernameToken SOAP in .NET Core 5.0 #5240

Open
@Mbialas1

Description

@Mbialas1

Hello,

I have problem with send SOAP xml file to service. I get error like: "wsse:FailedAuthentication
Failed to assert identity with UsernameToken. "
I think that I'm send correct imitation of UsernameToken. It look like this:

<Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
  <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-55fb2e8a-fa49-4bc2-a80a-11ed0808d5df" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:Username>user</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">e4lt9L9z/Zu9a3WlcLEqzIEaz94=</wsse:Password>
    <wsse:Nonce>0JGFVXqhNMr6wz0RTToMXw==</wsse:Nonce>
    <wsu:Created>2023-08-08T14:12:44Z</wsu:Created>
  </wsse:UsernameToken>
</Security>}

Any idea? Maybe I'm generate not correctly wsu:ID?
this.Id = $"SecurityToken-{Guid.NewGuid()}";

Generated password, nonce and time of created is correctly.

In project .net framework 4.8 this work fine, but in .net core 5.0 I cant send request to service. Im using this code: #3248

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions