mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Docbloc improvements
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user