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
|
|
|
|
2016-11-30 01:45:56 +05:30
|
|
|
use League\OAuth2\Server\Entity\ClientEntity as OriginalClientEntity;
|
2016-02-14 23:20:10 +05:30
|
|
|
use League\OAuth2\Server\Entity\EntityTrait;
|
|
|
|
|
|
|
|
class SessionEntity extends \League\OAuth2\Server\Entity\SessionEntity {
|
|
|
|
use EntityTrait;
|
|
|
|
|
|
|
|
protected $clientId;
|
|
|
|
|
|
|
|
public function getClientId() {
|
|
|
|
return $this->clientId;
|
|
|
|
}
|
|
|
|
|
2016-11-30 01:45:56 +05:30
|
|
|
public function associateClient(OriginalClientEntity $client) {
|
2016-02-14 23:20:10 +05:30
|
|
|
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
|
|
|
}
|