mirror of
https://github.com/elyby/accounts.git
synced 2024-12-27 07:30:18 +05:30
32 lines
668 B
PHP
32 lines
668 B
PHP
<?php
|
|
namespace api\components\OAuth2\Entities;
|
|
|
|
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;
|
|
}
|
|
|
|
public function setClientId(string $clientId) {
|
|
$this->clientId = $clientId;
|
|
}
|
|
|
|
}
|