0

I want wsse header generated in flutter like this https://doc.oroinc.com/api/authentication/wsse/

2

1 Answer 1

0

have never used those APIs, but here is generalised idea which default Dart libraries and i am doing a GET here, change it according to your needs

  var g = await HttpClient().getUrl(url);
  g.headers.set('Content-Type', 'application/vnd.api+json');
  g.headers.set('Authorization', 'WSSE profile="$usernameToken"');
  g.headers.set('X-WSSE', '''
        UsernameToken Username="$admin",
        PasswordDigest="$passworddigest",
        Created="$date",
        Nonce="$nonce"
  ''');
  var r = await g.close();
  //r is a stream
  //read the response body as string
  String body = await utf8.decodeStream(r);
Sign up to request clarification or add additional context in comments.

3 Comments

I mean I want to generate password digest and nonce in this way forum.oroinc.com/oro-platform/how-do-i-questions/topic/…
the document you have mentioned tells that the authentication method you are trying to do is depreciated, and it tells you to use Oauth2, which way much easier to implement on client side
But I have the api that has wsse authentication. So need this :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.