/** * Save the session * * @return void */ public function save() { // Save the session and get an identifier $id = $this->server->getSessionStorage()->create($this->getOwnerType(), $this->getOwnerId(), $this->getClient()->getId(), $this->getClient()->getRedirectUri()); $this->setId($id); // Associate the scope with the session foreach ($this->getScopes() as $scope) { $this->server->getSessionStorage()->associateScope($this, $scope); } }