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