mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
First commit of token types
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace League\OAuth2\Server;
|
||||
|
||||
use League\OAuth2\Server\Exception;
|
||||
use League\OAuth2\Server\TokenType\TokenTypeInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
@@ -32,6 +34,12 @@ abstract class AbstractServer
|
||||
*/
|
||||
protected $storages = [];
|
||||
|
||||
/**
|
||||
* Token type
|
||||
* @var TokenTypeInterface
|
||||
*/
|
||||
protected $tokenType;
|
||||
|
||||
/**
|
||||
* Sets the Request Object
|
||||
* @param \Symfony\Component\HttpFoundation\Request The Request Object
|
||||
@@ -72,4 +80,23 @@ abstract class AbstractServer
|
||||
|
||||
return $this->storages[$obj];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the access token type
|
||||
* @param TokenTypeInterface $tokenType The token type
|
||||
* @return void
|
||||
*/
|
||||
public function setTokenType(TokenTypeInterface $tokenType)
|
||||
{
|
||||
$this->tokenType = $tokenType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the access token type
|
||||
* @return TokenTypeInterface
|
||||
*/
|
||||
public function getTokenType()
|
||||
{
|
||||
return $this->tokenType;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user