mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-27 07:20:18 +05:30
Merge pull request #319 from Fuxy22/patch-1
Fixed missing session scope
This commit is contained in:
commit
cf6e86c9d4
@ -148,7 +148,6 @@ class AuthCodeGrant extends AbstractGrant
|
|||||||
$session = new SessionEntity($this->server);
|
$session = new SessionEntity($this->server);
|
||||||
$session->setOwner($type, $typeId);
|
$session->setOwner($type, $typeId);
|
||||||
$session->associateClient($authParams['client']);
|
$session->associateClient($authParams['client']);
|
||||||
$session->save();
|
|
||||||
|
|
||||||
// Create a new auth code
|
// Create a new auth code
|
||||||
$authCode = new AuthCodeEntity($this->server);
|
$authCode = new AuthCodeEntity($this->server);
|
||||||
@ -158,8 +157,10 @@ class AuthCodeGrant extends AbstractGrant
|
|||||||
|
|
||||||
foreach ($authParams['scopes'] as $scope) {
|
foreach ($authParams['scopes'] as $scope) {
|
||||||
$authCode->associateScope($scope);
|
$authCode->associateScope($scope);
|
||||||
|
$session->associateScope($scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$session->save();
|
||||||
$authCode->setSession($session);
|
$authCode->setSession($session);
|
||||||
$authCode->save();
|
$authCode->save();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user