Renamed response types to token types

This commit is contained in:
Alex Bilbie 2015-04-05 21:10:06 +01:00
parent 6e73099d8c
commit 721e52c5d9
6 changed files with 8 additions and 11 deletions

View File

@ -9,12 +9,12 @@
* @link https://github.com/thephpleague/oauth2-server * @link https://github.com/thephpleague/oauth2-server
*/ */
namespace League\OAuth2\Server\ResponseTypes; namespace League\OAuth2\Server\TokenTypes;
use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
abstract class AbstractResponseType implements ResponseTypeInterface abstract class AbstractTokenType implements TokenTypeInterface
{ {
/** /**
* Response array * Response array
@ -45,7 +45,7 @@ abstract class AbstractResponseType implements ResponseTypeInterface
} }
/** /**
* @param \League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface $accessToken * {@inheritdoc}
*/ */
public function setAccessToken(AccessTokenEntityInterface $accessToken) public function setAccessToken(AccessTokenEntityInterface $accessToken)
{ {

View File

@ -9,11 +9,11 @@
* @link https://github.com/thephpleague/oauth2-server * @link https://github.com/thephpleague/oauth2-server
*/ */
namespace League\OAuth2\Server\ResponseTypes; namespace League\OAuth2\Server\TokenTypes;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
class BearerTokenResponseType extends AbstractResponseType class BearerTokenType extends AbstractTokenType
{ {
/** /**
* {@inheritdoc} * {@inheritdoc}

View File

@ -9,15 +9,12 @@
* @link https://github.com/thephpleague/oauth2-server * @link https://github.com/thephpleague/oauth2-server
*/ */
namespace League\OAuth2\Server\ResponseTypes; namespace League\OAuth2\Server\TokenTypes;
use League\OAuth2\Server\AbstractServer;
use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\Interfaces\AccessTokenEntityInterface;
use League\OAuth2\Server\Entity\SessionEntity;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
interface ResponseTypeInterface interface ResponseTokenInterface
{ {
/** /**
* Generate a response * Generate a response
@ -58,7 +55,7 @@ interface ResponseTypeInterface
public function determineAccessTokenInHeader(Request $request); public function determineAccessTokenInHeader(Request $request);
/** /**
* @return Response * @return \Symfony\Component\HttpFoundation\Response
*/ */
public function generateHttpResponse(); public function generateHttpResponse();
} }