mirror of
https://github.com/elyby/accounts.git
synced 2024-12-27 15:40:21 +05:30
28 lines
572 B
PHP
28 lines
572 B
PHP
|
<?php
|
||
|
namespace common\components\oauth\Entity;
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
}
|