OpenID-Connect-PHP icon indicating copy to clipboard operation
OpenID-Connect-PHP copied to clipboard

SF client_secret_basic unsupported

Open fgarnier-hublot opened this issue 2 years ago • 0 comments

Salesforce .well-known/openid-configuration supports:

  "token_endpoint_auth_methods_supported": [
    "client_secret_post",
    "client_secret_basic",
    "private_key_jwt"
  ],

However, even if client_secret_basic is mentioned, SF required client_id and client_secret in the RequestToken So I had to comment a part of requestTokens function

        # Consider Basic authentication if provider config is set this way
        if ($this->supportsAuthMethod('client_secret_basic', $token_endpoint_auth_methods_supported)) {
//            $authorizationHeader = 'Authorization: Basic ' . base64_encode(urlencode($this->clientID) . ':' . urlencode($this->clientSecret));
//            unset($token_params['client_secret']);
//            unset($token_params['client_id']);
        }

fgarnier-hublot avatar Nov 04 '22 17:11 fgarnier-hublot