Skip to content

Commit

Permalink
Merge pull request #319 from Fuxy22/patch-1
Browse files Browse the repository at this point in the history
Fixed missing session scope
  • Loading branch information
alexbilbie committed Mar 13, 2015
2 parents f6fdbc7 + 7f7f456 commit cf6e86c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Grant/AuthCodeGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ public function newAuthorizeRequest($type, $typeId, $authParams = [])
$session = new SessionEntity($this->server);
$session->setOwner($type, $typeId);
$session->associateClient($authParams['client']);
$session->save();

// Create a new auth code
$authCode = new AuthCodeEntity($this->server);
Expand All @@ -158,8 +157,10 @@ public function newAuthorizeRequest($type, $typeId, $authParams = [])

foreach ($authParams['scopes'] as $scope) {
$authCode->associateScope($scope);
$session->associateScope($scope);
}

$session->save();
$authCode->setSession($session);
$authCode->save();

Expand Down

0 comments on commit cf6e86c

Please sign in to comment.