mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-02-09 18:25:54 +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) {
|
if ($this->scopes === null) {
|
||||||
$this->scopes = $this->formatScopes(
|
$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
|
// Associate the scope with the token
|
||||||
foreach ($this->getScopes() as $scope) {
|
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;
|
return $this;
|
||||||
@ -112,6 +112,6 @@ class AuthCodeEntity extends AbstractTokenEntity
|
|||||||
*/
|
*/
|
||||||
public function expire()
|
public function expire()
|
||||||
{
|
{
|
||||||
$this->server->getStorage('auth_code')->delete($this->getToken());
|
$this->server->getStorage('auth_code')->delete($this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user