mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 09:47:46 +05:30
Merge pull request #475 from thephpleague/analysis-zYjdLv
Applied fixes from StyleCI
This commit is contained in:
commit
c2e83ff359
@ -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
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -146,6 +146,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
|
||||
$htmlResponse = new HtmlResponse($this->accessTokenRepository);
|
||||
$htmlResponse->setStatusCode(403);
|
||||
$htmlResponse->setHtml($html);
|
||||
|
||||
return $htmlResponse;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user