Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/OAuth2/OAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,12 @@ public function grantAccessToken(Request $request = NULL) {
throw new OAuth2ServerException(self::HTTP_BAD_REQUEST, self::ERROR_INVALID_SCOPE, 'An unsupported scope was requested.');
}

$token = $this->createAccessToken($client, $stored['data'], $stored['scope']);
// grant all possible scopes if the request doesn't pass in a scope value.
if (!$input['scope']) {
$input['scope'] = $stored['scope'];
}

$token = $this->createAccessToken($client, $stored['data'], $input['scope']);

return new Response(json_encode($token), 200, $this->getJsonHeaders());
}
Expand Down