Declared methods from AbstractGrant on GrantTypeInterface as per #255

This commit is contained in:
Alex Bilbie 2014-11-21 00:06:01 +00:00
parent 2f971dc77f
commit cfada388db
2 changed files with 32 additions and 10 deletions

View File

@ -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)
{

View File

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