message icon indicating copy to clipboard operation
message copied to clipboard

WSSE Authentication

Open template-provider opened this issue 4 years ago • 0 comments

PHP version: 7.2

Description Cannot authenticate with WSSE Plugin

How to reproduce Use WSSE REST Api like emarsys rest api

Possible Solution Change line in Wsse.php

$digest = base64_encode(hash($this->hashAlgorithm, $nonce.$created.$this->password, false));

Additional context I am trying to auth against a wsse api from emarsys. But the auth does not work correctly with the current implementation. Current:

$digest = base64_encode(hash($this->hashAlgorithm, base64_decode($nonce).$created.$this->password, true));

The base64_decode is not needed because the nonce creation is using a md5. The parameter binary should be false instead of true, than the auth works. Can anybody reproduce this? Thx

template-provider avatar Oct 18 '21 17:10 template-provider