mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Namespace renamed TokenType > TokenTypes
This commit is contained in:
parent
7c57310b67
commit
027971776b
@ -9,12 +9,11 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\TokenType;
|
||||
namespace League\OAuth2\Server\TokenTypes;
|
||||
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
use League\OAuth2\Server\Entity\SessionEntity;
|
||||
use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface;
|
||||
|
||||
abstract class AbstractTokenType
|
||||
abstract class AbstractTokenType implements TokenTypeInterface
|
||||
{
|
||||
/**
|
||||
* Response array
|
||||
@ -24,38 +23,9 @@ abstract class AbstractTokenType
|
||||
protected $response = [];
|
||||
|
||||
/**
|
||||
* Server
|
||||
*
|
||||
* @var \League\OAuth2\Server\AbstractServer $server
|
||||
* @var \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface
|
||||
*/
|
||||
protected $server;
|
||||
|
||||
/**
|
||||
* Server
|
||||
*
|
||||
* @var \League\OAuth2\Server\Entity\SessionEntity $session
|
||||
*/
|
||||
protected $session;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setServer(AbstractServer $server)
|
||||
{
|
||||
$this->server = $server;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setSession(SessionEntity $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
|
||||
return $this;
|
||||
}
|
||||
protected $accessToken;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
@ -72,4 +42,12 @@ abstract class AbstractTokenType
|
||||
{
|
||||
return isset($this->response[$key]) ? $this->response[$key] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface $accessToken
|
||||
*/
|
||||
public function setAccessToken(AccessTokenEntityInterface $accessToken)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
}
|
||||
}
|
@ -9,11 +9,11 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\TokenType;
|
||||
namespace League\OAuth2\Server\TokenTypes;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class Bearer extends AbstractTokenType implements TokenTypeInterface
|
||||
class Bearer extends AbstractTokenType
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
@ -9,7 +9,7 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\TokenType;
|
||||
namespace League\OAuth2\Server\TokenTypes;
|
||||
|
||||
use League\OAuth2\Server\Util\SecureKey;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
@ -9,9 +9,10 @@
|
||||
* @link https://github.com/thephpleague/oauth2-server
|
||||
*/
|
||||
|
||||
namespace League\OAuth2\Server\TokenType;
|
||||
namespace League\OAuth2\Server\TokenTypes;
|
||||
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface;
|
||||
use League\OAuth2\Server\Entity\SessionEntity;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
@ -25,13 +26,9 @@ interface TokenTypeInterface
|
||||
public function generateResponse();
|
||||
|
||||
/**
|
||||
* Set the server
|
||||
*
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
*
|
||||
* @return self
|
||||
* @param \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface $accessToken
|
||||
*/
|
||||
public function setServer(AbstractServer $server);
|
||||
public function setAccessToken(AccessTokenEntityInterface $accessToken);
|
||||
|
||||
/**
|
||||
* Set a key/value response pair
|
||||
@ -50,13 +47,6 @@ interface TokenTypeInterface
|
||||
*/
|
||||
public function getParam($key);
|
||||
|
||||
/**
|
||||
* @param \League\OAuth2\Server\Entity\SessionEntity $session
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setSession(SessionEntity $session);
|
||||
|
||||
/**
|
||||
* Determine the access token in the authorization header
|
||||
*
|
Loading…
Reference in New Issue
Block a user