2016-02-14 23:20:10 +05:30
|
|
|
<?php
|
|
|
|
namespace common\components\oauth\Entity;
|
|
|
|
|
|
|
|
use League\OAuth2\Server\Entity\EntityTrait;
|
2016-02-23 03:19:46 +05:30
|
|
|
use League\OAuth2\Server\Entity\SessionEntity as OriginalSessionEntity;
|
2016-02-14 23:20:10 +05:30
|
|
|
|
|
|
|
class AccessTokenEntity extends \League\OAuth2\Server\Entity\AccessTokenEntity {
|
|
|
|
use EntityTrait;
|
|
|
|
|
|
|
|
protected $sessionId;
|
|
|
|
|
|
|
|
public function getSessionId() {
|
|
|
|
return $this->sessionId;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
* @return static
|
|
|
|
*/
|
2016-02-23 03:19:46 +05:30
|
|
|
public function setSession(OriginalSessionEntity $session) {
|
2016-02-14 23:20:10 +05:30
|
|
|
parent::setSession($session);
|
|
|
|
$this->sessionId = $session->getId();
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|