Skip to content

Commit

Permalink
Made refresh token grant work with public clients until
Browse files Browse the repository at this point in the history
thephpleague#1073 is addressed.
  • Loading branch information
bobdercole committed Nov 25, 2020
1 parent 09f22e8 commit 7ab3f7a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Grant/RefreshTokenGrant.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ public function respondToAccessTokenRequest(
ResponseTypeInterface $responseType,
DateInterval $accessTokenTTL
) {
// Validate request
$client = $this->validateClient($request);
list($clientId) = $this->getClientCredentials($request);

$client = $this->getClientEntityOrFail($clientId, $request);

// Only validate the client if it is confidential
if ($client->isConfidential()) {
$this->validateClient($request);
}

$oldRefreshToken = $this->validateOldRefreshToken($request, $client->getIdentifier());
$scopes = $this->validateScopes($this->getRequestParameter(
'scope',
Expand Down

0 comments on commit 7ab3f7a

Please sign in to comment.