First commit of token types

This commit is contained in:
Alex Bilbie
2014-04-23 17:02:50 +01:00
parent b3c3676381
commit c5ffd05eee
9 changed files with 174 additions and 31 deletions

View File

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