2016-02-14 23:20:10 +05:30
|
|
|
<?php
|
2016-11-27 03:13:42 +05:30
|
|
|
namespace api\components\OAuth2\Entities;
|
2016-02-14 23:20:10 +05:30
|
|
|
|
|
|
|
use League\OAuth2\Server\Entity\ClientEntity;
|
|
|
|
use League\OAuth2\Server\Entity\EntityTrait;
|
|
|
|
|
|
|
|
class SessionEntity extends \League\OAuth2\Server\Entity\SessionEntity {
|
|
|
|
use EntityTrait;
|
|
|
|
|
|
|
|
protected $clientId;
|
|
|
|
|
|
|
|
public function getClientId() {
|
|
|
|
return $this->clientId;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
* @return static
|
|
|
|
*/
|
|
|
|
public function associateClient(ClientEntity $client) {
|
|
|
|
parent::associateClient($client);
|
|
|
|
$this->clientId = $client->getId();
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2016-11-27 03:13:42 +05:30
|
|
|
public function setClientId(string $clientId) {
|
|
|
|
$this->clientId = $clientId;
|
|
|
|
}
|
|
|
|
|
2016-02-14 23:20:10 +05:30
|
|
|
}
|