diff --git a/src/AuthorizationValidators/AuthorizationValidatorInterface.php b/src/AuthorizationValidators/AuthorizationValidatorInterface.php index 2ed2a1ee..9fc24891 100644 --- a/src/AuthorizationValidators/AuthorizationValidatorInterface.php +++ b/src/AuthorizationValidators/AuthorizationValidatorInterface.php @@ -15,4 +15,4 @@ interface AuthorizationValidatorInterface * @return ServerRequestInterface */ public function validateAuthorization(ServerRequestInterface $request); -} \ No newline at end of file +} diff --git a/src/AuthorizationValidators/BearerTokenValidator.php b/src/AuthorizationValidators/BearerTokenValidator.php index 62d25abc..5dab2203 100644 --- a/src/AuthorizationValidators/BearerTokenValidator.php +++ b/src/AuthorizationValidators/BearerTokenValidator.php @@ -2,12 +2,12 @@ namespace League\OAuth2\Server\AuthorizationValidators; -use League\OAuth2\Server\CryptTrait; -use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; -use Psr\Http\Message\ServerRequestInterface; use Lcobucci\JWT\Parser; use Lcobucci\JWT\Signer\Rsa\Sha256; +use League\OAuth2\Server\CryptTrait; use League\OAuth2\Server\Exception\OAuthServerException; +use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface; +use Psr\Http\Message\ServerRequestInterface; class BearerTokenValidator implements AuthorizationValidatorInterface { @@ -63,4 +63,4 @@ class BearerTokenValidator implements AuthorizationValidatorInterface throw OAuthServerException::accessDenied($exception->getMessage()); } } -} \ No newline at end of file +} diff --git a/src/CryptTrait.php b/src/CryptTrait.php index 3c649762..844f810f 100644 --- a/src/CryptTrait.php +++ b/src/CryptTrait.php @@ -119,4 +119,4 @@ trait CryptTrait return $output; } -} \ No newline at end of file +} diff --git a/src/Grant/AbstractAuthorizeGrant.php b/src/Grant/AbstractAuthorizeGrant.php index 7c08dccf..e409d2b2 100644 --- a/src/Grant/AbstractAuthorizeGrant.php +++ b/src/Grant/AbstractAuthorizeGrant.php @@ -50,6 +50,7 @@ abstract class AbstractAuthorizeGrant extends AbstractGrant public function makeRedirectUri($uri, $params = [], $queryDelimiter = '?') { $uri .= (strstr($uri, $queryDelimiter) === false) ? $queryDelimiter : '&'; + return $uri . http_build_query($params); } } diff --git a/src/Grant/AuthCodeGrant.php b/src/Grant/AuthCodeGrant.php index 10ccb1e8..05ea1f38 100644 --- a/src/Grant/AuthCodeGrant.php +++ b/src/Grant/AuthCodeGrant.php @@ -146,6 +146,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant $htmlResponse = new HtmlResponse($this->accessTokenRepository); $htmlResponse->setStatusCode(403); $htmlResponse->setHtml($html); + return $htmlResponse; } diff --git a/src/Grant/ImplicitGrant.php b/src/Grant/ImplicitGrant.php index 3fd567d4..7da987d7 100644 --- a/src/Grant/ImplicitGrant.php +++ b/src/Grant/ImplicitGrant.php @@ -144,6 +144,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant $htmlResponse = new HtmlResponse($this->accessTokenRepository); $htmlResponse->setStatusCode(403); $htmlResponse->setHtml($html); + return $htmlResponse; } @@ -155,7 +156,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant 'postback_uri' => $this->makeRedirectUri( $postbackUri, $request->getQueryParams() - ) + ), ]); $htmlResponse = new HtmlResponse($this->accessTokenRepository); diff --git a/src/ResponseTypes/HtmlResponse.php b/src/ResponseTypes/HtmlResponse.php index ad05f53e..11a92b9c 100644 --- a/src/ResponseTypes/HtmlResponse.php +++ b/src/ResponseTypes/HtmlResponse.php @@ -63,4 +63,4 @@ class HtmlResponse extends AbstractResponseType { $this->headers[$key] = $value; } -} \ No newline at end of file +} diff --git a/src/ResponseTypes/RedirectResponse.php b/src/ResponseTypes/RedirectResponse.php index d171a12d..d37e58e6 100644 --- a/src/ResponseTypes/RedirectResponse.php +++ b/src/ResponseTypes/RedirectResponse.php @@ -28,4 +28,4 @@ class RedirectResponse extends AbstractResponseType { return $response->withStatus(302)->withHeader('location', $this->redirectUri); } -} \ No newline at end of file +} diff --git a/src/Server.php b/src/Server.php index 30bfd194..5e0f2190 100644 --- a/src/Server.php +++ b/src/Server.php @@ -69,12 +69,12 @@ class Server implements EmitterAwareInterface /** * New server instance. * - * @param \League\OAuth2\Server\Repositories\ClientRepositoryInterface $clientRepository - * @param \League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface $accessTokenRepository - * @param \League\OAuth2\Server\Repositories\ScopeRepositoryInterface $scopeRepository - * @param string $privateKeyPath - * @param string $publicKeyPath - * @param null|\League\OAuth2\Server\ResponseTypes\ResponseTypeInterface $responseType + * @param \League\OAuth2\Server\Repositories\ClientRepositoryInterface $clientRepository + * @param \League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface $accessTokenRepository + * @param \League\OAuth2\Server\Repositories\ScopeRepositoryInterface $scopeRepository + * @param string $privateKeyPath + * @param string $publicKeyPath + * @param null|\League\OAuth2\Server\ResponseTypes\ResponseTypeInterface $responseType * @param null|\League\OAuth2\Server\AuthorizationValidators\AuthorizationValidatorInterface $authorizationValidator */ public function __construct(