Docbloc improvements

This commit is contained in:
Brooke Bryan
2014-11-12 18:10:29 +00:00
parent 8b1f3ef193
commit b2c0933ee6
22 changed files with 48 additions and 31 deletions

View File

@@ -125,6 +125,7 @@ abstract class AbstractGrant implements GrantTypeInterface
* @param string|null $redirectUri The redirect URI to return the user to
* @return \League\OAuth2\Server\Entity\ScopeEntity[]
* @throws \League\OAuth2\Server\Exception\InvalidScopeException If scope is invalid, or no scopes passed when required
* @throws
*/
public function validateScopes($scopeParam = '', ClientEntity $client, $redirectUri = null)
{

View File

@@ -18,7 +18,6 @@ use League\OAuth2\Server\Entity\RefreshTokenEntity;
use League\OAuth2\Server\Entity\SessionEntity;
use League\OAuth2\Server\Event;
use League\OAuth2\Server\Exception;
use League\OAuth2\Server\Request;
use League\OAuth2\Server\Util\SecureKey;
/**
@@ -40,7 +39,7 @@ class AuthCodeGrant extends AbstractGrant
/**
* AuthServer instance
* @var AuthServer
* @var \League\OAuth2\Server\AuthorizationServer
*/
protected $server = null;
@@ -70,6 +69,8 @@ class AuthCodeGrant extends AbstractGrant
* Check authorize parameters
*
* @return array Authorize request parameters
*
* @throws
*/
public function checkAuthorizeParams()
{
@@ -160,6 +161,7 @@ class AuthCodeGrant extends AbstractGrant
/**
* Complete the auth code grant
* @return array
* @throws
*/
public function completeFlow()
{
@@ -257,7 +259,7 @@ class AuthCodeGrant extends AbstractGrant
$accessToken->setSession($session);
$accessToken->save();
if ($this->server->hasGrantType('refresh_token')) {
if ($refreshToken && $this->server->hasGrantType('refresh_token')) {
$refreshToken->setAccessToken($accessToken);
$refreshToken->save();
}

View File

@@ -37,7 +37,7 @@ class ClientCredentialsGrant extends AbstractGrant
/**
* AuthServer instance
* @var AuthServer
* @var \League\OAuth2\Server\AuthorizationServer
*/
protected $server = null;
@@ -50,6 +50,7 @@ class ClientCredentialsGrant extends AbstractGrant
/**
* Complete the client credentials grant
* @return array
* @throws
*/
public function completeFlow()
{

View File

@@ -61,6 +61,7 @@ class PasswordGrant extends AbstractGrant
/**
* Return the callback function
* @return callable
* @throws
*/
protected function getVerifyCredentialsCallback()
{
@@ -74,6 +75,7 @@ class PasswordGrant extends AbstractGrant
/**
* Complete the password grant
* @return array
* @throws
*/
public function completeFlow()
{

View File

@@ -16,7 +16,6 @@ use League\OAuth2\Server\Entity\ClientEntity;
use League\OAuth2\Server\Entity\RefreshTokenEntity;
use League\OAuth2\Server\Event;
use League\OAuth2\Server\Exception;
use League\OAuth2\Server\Request;
use League\OAuth2\Server\Util\SecureKey;
/**