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-11-30 01:45:56 +05:30
|
|
|
use League\OAuth2\Server\Entity\SessionEntity as OriginalSessionEntity;
|
2016-02-14 23:20:10 +05:30
|
|
|
|
|
|
|
class AuthCodeEntity extends \League\OAuth2\Server\Entity\AuthCodeEntity {
|
|
|
|
|
|
|
|
protected $sessionId;
|
|
|
|
|
|
|
|
public function getSessionId() {
|
|
|
|
return $this->sessionId;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritdoc
|
|
|
|
* @return static
|
|
|
|
*/
|
2016-11-30 01:45:56 +05:30
|
|
|
public function setSession(OriginalSessionEntity $session) {
|
2016-02-14 23:20:10 +05:30
|
|
|
parent::setSession($session);
|
|
|
|
$this->sessionId = $session->getId();
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2016-11-30 04:49:14 +05:30
|
|
|
public function setSessionId(string $sessionId) {
|
|
|
|
$this->sessionId = $sessionId;
|
|
|
|
}
|
|
|
|
|
2016-02-14 23:20:10 +05:30
|
|
|
}
|