Closed delboy1978uk closed 8 years ago
Both method are valid ways of authenticating with client credentials.
Hi Brent Thanks for getting back :-)
For some reason all I got when doing it the original way was the 'invalid_client' response mentioned above.
Please note though my OAuth pages are on a VM, whilst the curl command I ran was from my Mac Terminal.
Possibly the Mac build of curl is implemented differently? I'm not sure, however if the command I ended up running will work on any curl, then maybe we should use that instead?
Great work btw, cheers! Derek
It's probably because PHP does not include HTTP_AUTHORIZATION in the $_SERVER array by default (see this fix). Something like this might work:
if (isset(getallheaders()['Authorization'])) {
$_SERVER['HTTP_AUTHORIZATION'] = getallheaders()['Authorization'];
}
I may try to add support for this directly in the library, since the current solution apparently is not enough.
the original command returned: {"error":"invalid_client","error_description":"The client credentials are invalid"}