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-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 {
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|