Reputation: 1
I want wsse header generated in flutter like this https://doc.oroinc.com/api/authentication/wsse/
Upvotes: 0
Views: 208
Reputation: 3305
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);
Upvotes: 0