mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-27 15:30:24 +05:30
Applied fixes from StyleCI
This commit is contained in:
parent
f7f3cdee24
commit
c40a10a071
@ -44,7 +44,7 @@ class ImplicitGrantTest extends \PHPUnit_Framework_TestCase
|
||||
[],
|
||||
[],
|
||||
[
|
||||
'response_type' => 'token'
|
||||
'response_type' => 'token',
|
||||
]
|
||||
);
|
||||
|
||||
|
@ -35,6 +35,7 @@ class ResourceServerMiddlewareTest extends \PHPUnit_Framework_TestCase
|
||||
new Response(),
|
||||
function () {
|
||||
$this->assertEquals('test', func_get_args()[0]->getAttribute('oauth_access_token_id'));
|
||||
|
||||
return func_get_args()[1];
|
||||
}
|
||||
);
|
||||
@ -69,5 +70,4 @@ class ResourceServerMiddlewareTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals(401, $response->getStatusCode());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ use League\OAuth2\Server\Exception\OAuthServerException;
|
||||
use League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface;
|
||||
use League\OAuth2\Server\ResponseTypes\BearerTokenResponse;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Zend\Diactoros\Request;
|
||||
use Zend\Diactoros\Response;
|
||||
use Zend\Diactoros\ServerRequest;
|
||||
|
||||
@ -136,7 +135,7 @@ class BearerResponseTypeTest extends \PHPUnit_Framework_TestCase
|
||||
$json = json_decode($response->getBody()->getContents());
|
||||
|
||||
$request = new ServerRequest();
|
||||
$request = $request->withHeader('authorization', sprintf('Bearer %s', $json->access_token.'foo'));
|
||||
$request = $request->withHeader('authorization', sprintf('Bearer %s', $json->access_token . 'foo'));
|
||||
|
||||
try {
|
||||
$responseType->determineAccessTokenInHeader($request);
|
||||
|
@ -15,7 +15,6 @@ use League\OAuth2\Server\Repositories\UserRepositoryInterface;
|
||||
use League\OAuth2\Server\ResponseTypes\BearerTokenResponse;
|
||||
use League\OAuth2\Server\Server;
|
||||
use LeagueTests\Stubs\StubResponseType;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Zend\Diactoros\ServerRequest;
|
||||
|
||||
|
@ -45,8 +45,9 @@ class StubResponseType extends AbstractResponseType
|
||||
/**
|
||||
* @param ServerRequestInterface $request
|
||||
*
|
||||
* @return \Psr\Http\Message\ServerRequestInterface
|
||||
* @throws \League\OAuth2\Server\Exception\OAuthServerException
|
||||
*
|
||||
* @return \Psr\Http\Message\ServerRequestInterface
|
||||
*/
|
||||
public function determineAccessTokenInHeader(ServerRequestInterface $request)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user