From cfada388db6c72c43fff998a35dd1f2124748f27 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 21 Nov 2014 00:06:01 +0000 Subject: [PATCH] Declared methods from AbstractGrant on GrantTypeInterface as per #255 --- src/Grant/AbstractGrant.php | 14 ++++---------- src/Grant/GrantTypeInterface.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index 42309970..eca92d30 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -52,8 +52,7 @@ abstract class AbstractGrant implements GrantTypeInterface protected $accessTokenTTL; /** - * Return the identifier - * @return string + * {@inheritdoc} */ public function getIdentifier() { @@ -61,9 +60,7 @@ abstract class AbstractGrant implements GrantTypeInterface } /** - * Return the identifier - * @param string $identifier - * @return self + * {@inheritdoc} */ public function setIdentifier($identifier) { @@ -73,8 +70,7 @@ abstract class AbstractGrant implements GrantTypeInterface } /** - * Return the response type - * @return string + * {@inheritdoc} */ public function getResponseType() { @@ -107,9 +103,7 @@ abstract class AbstractGrant implements GrantTypeInterface } /** - * Inject the authorization server into the grant - * @param \League\OAuth2\Server\AuthorizationServer $server The authorization server instance - * @return self + * {@inheritdoc} */ public function setAuthorizationServer(AuthorizationServer $server) { diff --git a/src/Grant/GrantTypeInterface.php b/src/Grant/GrantTypeInterface.php index 5bad669c..77ada2c7 100644 --- a/src/Grant/GrantTypeInterface.php +++ b/src/Grant/GrantTypeInterface.php @@ -11,11 +11,39 @@ namespace League\OAuth2\Server\Grant; +use League\OAuth2\Server\AuthorizationServer; + /** * Grant type interface */ interface GrantTypeInterface { + /** + * Return the identifier + * @return string + */ + public function getIdentifier(); + + /** + * Return the identifier + * @param string $identifier + * @return self + */ + public function setIdentifier($identifier); + + /** + * Return the response type + * @return string + */ + public function getResponseType(); + + /** + * Inject the authorization server into the grant + * @param \League\OAuth2\Server\AuthorizationServer $server The authorization server instance + * @return self + */ + public function setAuthorizationServer(AuthorizationServer $server); + /** * Complete the grant flow * @return array