mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 18:19:47 +05:30
Fixed auth code entity storage calls
This commit is contained in:
parent
719b87a40c
commit
f7e68d6e10
@ -81,7 +81,7 @@ class AuthCodeEntity extends AbstractTokenEntity
|
||||
{
|
||||
if ($this->scopes === null) {
|
||||
$this->scopes = $this->formatScopes(
|
||||
$this->server->getStorage('auth_code')->getScopes($this->getToken())
|
||||
$this->server->getStorage('auth_code')->getScopes($this)
|
||||
);
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ class AuthCodeEntity extends AbstractTokenEntity
|
||||
|
||||
// Associate the scope with the token
|
||||
foreach ($this->getScopes() as $scope) {
|
||||
$this->server->getStorage('auth_code')->associateScope($this->getToken(), $scope->getId());
|
||||
$this->server->getStorage('auth_code')->associateScope($this, $scope);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@ -112,6 +112,6 @@ class AuthCodeEntity extends AbstractTokenEntity
|
||||
*/
|
||||
public function expire()
|
||||
{
|
||||
$this->server->getStorage('auth_code')->delete($this->getToken());
|
||||
$this->server->getStorage('auth_code')->delete($this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user