File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/OAuth2/ClientAssertionType Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,14 @@ public function getClientId()
115115 public function getClientCredentials (RequestInterface $ request , ResponseInterface $ response = null )
116116 {
117117 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+ );
119126 }
120127
121128 if ($ this ->config ['allow_credentials_in_request_body ' ]) {
You can’t perform that action at this time.
0 commit comments