diff --git a/src/Entity/Session.php b/src/Entity/Session.php index 767403c4..ab166253 100644 --- a/src/Entity/Session.php +++ b/src/Entity/Session.php @@ -209,7 +209,7 @@ class Session return $this->client; } - $this->client = $this->server->getStorage('client')->getBySession($this->getId()); + $this->client = $this->server->getStorage('client')->getBySession($this); return $this->client; } diff --git a/src/Storage/ClientInterface.php b/src/Storage/ClientInterface.php index fa881356..267888f0 100644 --- a/src/Storage/ClientInterface.php +++ b/src/Storage/ClientInterface.php @@ -11,6 +11,8 @@ namespace League\OAuth2\Server\Storage; +use League\OAuth2\Server\Entity\Session; + /** * Client storage interface */