mirror of
https://github.com/elyby/accounts.git
synced 2024-11-16 02:03:42 +05:30
422d5c4fd4
Переписана логика связи моделей для oAuth процесса
30 lines
640 B
PHP
30 lines
640 B
PHP
<?php
|
|
namespace api\components\OAuth2\Entities;
|
|
|
|
use League\OAuth2\Server\Entity\SessionEntity as OriginalSessionEntity;
|
|
|
|
class AuthCodeEntity extends \League\OAuth2\Server\Entity\AuthCodeEntity {
|
|
|
|
protected $sessionId;
|
|
|
|
public function getSessionId() {
|
|
return $this->sessionId;
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
* @return static
|
|
*/
|
|
public function setSession(OriginalSessionEntity $session) {
|
|
parent::setSession($session);
|
|
$this->sessionId = $session->getId();
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function setSessionId(string $sessionId) {
|
|
$this->sessionId = $sessionId;
|
|
}
|
|
|
|
}
|