Skip to content

Commit

Permalink
Symfony 5 compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Klapaudius committed Sep 29, 2020
1 parent fdf695b commit 61bf418
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Security/Firewall/OAuthListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use FOS\OAuthServerBundle\Security\Authentication\Token\OAuthToken;
use OAuth2\OAuth2;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
Expand Down Expand Up @@ -58,9 +58,9 @@ public function __construct(TokenStorageInterface $tokenStorage, AuthenticationM
}

/**
* @param GetResponseEvent $event the event
* @param RequestEvent $event the event
*/
public function __invoke(GetResponseEvent $event)
public function __invoke(RequestEvent $event)
{
if (null === $oauthToken = $this->serverService->getBearerToken($event->getRequest(), true)) {
return;
Expand Down
4 changes: 2 additions & 2 deletions Tests/Security/Firewall/OAuthListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use FOS\OAuthServerBundle\Tests\TestCase;
use OAuth2\OAuth2;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;

class OAuthListenerTest extends TestCase
Expand Down Expand Up @@ -58,7 +58,7 @@ public function setUp()
}

$this->event = $this
->getMockBuilder(GetResponseEvent::class)
->getMockBuilder(RequestEvent::class)
->disableOriginalConstructor()
->getMock()
;
Expand Down

0 comments on commit 61bf418

Please sign in to comment.