Skip to content

Commit

Permalink
[OAuth2] Feature: Provider\GitHub - sign request by Authorization hea…
Browse files Browse the repository at this point in the history
…der (deprecated notice from GitHub)
  • Loading branch information
ovr committed Apr 18, 2020
1 parent 07fc59c commit a99b5da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Provider/GitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ public function parseToken(string $body)
return new AccessToken($token);
}

/**
* {@inheritDoc}
*/
public function prepareRequest(string $method, string $uri, array &$headers, array &$query, AccessTokenInterface $accessToken = null): void
{
if ($accessToken) {
$headers['Authorization'] = "bearer {$accessToken->getToken()}";
}
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit a99b5da

Please sign in to comment.