mirror of
https://github.com/elyby/accounts.git
synced 2024-11-10 07:22:00 +05:30
28 lines
573 B
PHP
28 lines
573 B
PHP
|
<?php
|
||
|
namespace common\components\oauth\Entity;
|
||
|
|
||
|
use League\OAuth2\Server\Entity\EntityTrait;
|
||
|
use League\OAuth2\Server\Entity\SessionEntity;
|
||
|
|
||
|
class AuthCodeEntity extends \League\OAuth2\Server\Entity\AuthCodeEntity {
|
||
|
use EntityTrait;
|
||
|
|
||
|
protected $sessionId;
|
||
|
|
||
|
public function getSessionId() {
|
||
|
return $this->sessionId;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @inheritdoc
|
||
|
* @return static
|
||
|
*/
|
||
|
public function setSession(SessionEntity $session) {
|
||
|
parent::setSession($session);
|
||
|
$this->sessionId = $session->getId();
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
}
|