Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding basic authentication by default on signed routes
According to [RFC-6749](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1) clients can choose from a number of authentication methods to authenticate with the authorization server. Section 2.3.1 states that clients can put the credentials either as a Basic authorization header or passing the credentials in the body of the POST. Right now, the default method for Socialite (in AbstractProvider) is to pass the credentials in the body of the POST. However, the spec states this: > Including the client credentials in the request-body using the two parameters is NOT RECOMMENDED and SHOULD be limited to clients unable > to directly utilize the HTTP Basic authentication scheme (or other > password-based HTTP authentication schemes). So Socialite passes the credentials using the "non recommended" way. Furthermore, this way of passing the credentials in NOT supported by all servers. However, the Basic authentication method is mandated to be compulsory per the spec: > The authorization server MUST support the HTTP Basic > authentication scheme for authenticating clients that were issued a > client password. This commit adds Basic authentication header to the requests created by the `AbstractProvider`.
- Loading branch information