- 🇫🇷France pacproduct
I'm facing this exact same issue too, maybe this should be an option?
@rogeriocc Would you care to share how you solved it with some code examples? :)
I need to add 'Authorization' => 'basic' to the HTTP request header in the retrieveTokens method in OpenIDConnectClientBase.php. In addition, my 'Authorization' will receive the base64 value from client_id concatenated with client_secret.
Would it be possible to make these changes via hook?
I'm sorry, if I'm posting a question without much foundation or an easy solution, I'm starting with the development of Drupal 8/9.
Here is the code I need to change/add on retrieveTokens method:
$client_concat = $this->configuration['client_id'] . ':' . $this->configuration['client_secret'];
$client_hash = base64_encode($client_id_secret_concat);
$request_options = [
'form_params' => [
'code' => $authorization_code,
'client_id' => $this->configuration['client_id'],
'client_secret' => $this->configuration['client_secret'],
'redirect_uri' => $redirect_uri,
'grant_type' => 'authorization_code',
],
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'basic ' . $client_hash,
],
];
Sorry for my english and thank you
Fixed
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I'm facing this exact same issue too, maybe this should be an option?
@rogeriocc Would you care to share how you solved it with some code examples? :)