File tree 1 file changed +8
-1
lines changed
src/OAuth2/ClientAssertionType
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,14 @@ public function getClientId()
115
115
public function getClientCredentials (RequestInterface $ request , ResponseInterface $ response = null )
116
116
{
117
117
if (!is_null ($ request ->headers ('PHP_AUTH_USER ' )) && !is_null ($ request ->headers ('PHP_AUTH_PW ' ))) {
118
- return array ('client_id ' => $ request ->headers ('PHP_AUTH_USER ' ), 'client_secret ' => $ request ->headers ('PHP_AUTH_PW ' ));
118
+ return array (
119
+ /**
120
+ * client credentials are URL-encoded before being encoded in the HTTP Basic header, so we decode them here
121
+ * @see http://tools.ietf.org/html/rfc6749#section-2.3.1
122
+ */
123
+ 'client_id ' => urldecode ($ request ->headers ('PHP_AUTH_USER ' )),
124
+ 'client_secret ' => urldecode ($ request ->headers ('PHP_AUTH_PW ' )),
125
+ );
119
126
}
120
127
121
128
if ($ this ->config ['allow_credentials_in_request_body ' ]) {
You can’t perform that action at this time.
0 commit comments