mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-08 21:52:24 +05:30
Fix #202
This commit is contained in:
parent
b9e12a7fec
commit
7d8989a8cd
@ -223,6 +223,10 @@ class AuthCodeGrant extends AbstractGrant
|
||||
$session->associateScope($authCodeScope);
|
||||
}
|
||||
|
||||
foreach ($session->getScopes() as $scope) {
|
||||
$accessToken->associateScope($scope);
|
||||
}
|
||||
|
||||
$this->server->getTokenType()->set('access_token', $accessToken->getId());
|
||||
$this->server->getTokenType()->set('expires_in', $this->server->getAccessTokenTTL());
|
||||
|
||||
|
@ -98,8 +98,11 @@ class ClientCredentialsGrant extends AbstractGrant
|
||||
|
||||
// Associate scopes with the session and access token
|
||||
foreach ($scopes as $scope) {
|
||||
$accessToken->associateScope($scope);
|
||||
$session->associateScope($scope);
|
||||
$session->associateScope($scope);
|
||||
}
|
||||
|
||||
foreach ($session->getScopes() as $scope) {
|
||||
$accessToken->associateScope($scope);
|
||||
}
|
||||
|
||||
// Save everything
|
||||
|
@ -138,8 +138,11 @@ class PasswordGrant extends AbstractGrant
|
||||
|
||||
// Associate scopes with the session and access token
|
||||
foreach ($scopes as $scope) {
|
||||
$accessToken->associateScope($scope);
|
||||
$session->associateScope($scope);
|
||||
$session->associateScope($scope);
|
||||
}
|
||||
|
||||
foreach ($session->getScopes() as $scope) {
|
||||
$accessToken->associateScope($scope);
|
||||
}
|
||||
|
||||
$this->server->getTokenType()->set('access_token', $accessToken->getId());
|
||||
|
Loading…
Reference in New Issue
Block a user