Bug in example PHP application
Hi,
if you're using the provided example PHP application there's a small bug that can impact authentication.
In function getAuthTokenByAdminCredentials
CHANGE:
$data = sprintf("grant_type=%s&username=%s&password=%s&scope=%s", 'password', $login, $password, $this->tokenScope);
TO:
$data = sprintf("grant_type=%s&username=%s&password=%s&scope=%s", 'password', urlencode($login), urlencode($password), urlencode($this->tokenScope));
We had a user unable to login and found that a reserved character in the password meant the string was being incorrectly parsed. urlencode() escapes special characters so they are passed through correctly.
Regards,
Russell.
Hi Russell,
Thanks for contribution. PHP sample on github is updated.