From 6390662afbc89e257d6d281a87b84c44a5deb500 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:01:33 +0100 Subject: [PATCH] ren ame LogOutAuth0Adapter to LogOutOAuthAdapter --- app/ActionServiceProvider.php | 4 ++-- .../{LogOutAuth0Adapter.php => LogOutOAuthAdapter.php} | 2 +- ...ogOutAuth0AdapterTest.php => LogOutOAuthAdapterTest.php} | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/Infrastructure/Service/{LogOutAuth0Adapter.php => LogOutOAuthAdapter.php} (96%) rename tests/Infrastructure/Service/{LogOutAuth0AdapterTest.php => LogOutOAuthAdapterTest.php} (89%) diff --git a/app/ActionServiceProvider.php b/app/ActionServiceProvider.php index 14b57f5..a442984 100644 --- a/app/ActionServiceProvider.php +++ b/app/ActionServiceProvider.php @@ -26,7 +26,7 @@ use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\ExtractLocaleFromRequest; use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\IsAllowedRefreshToken; use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\LoginAuth0Adapter; -use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\LogOutAuth0Adapter; +use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\LogOutOAuthAdapter; use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\RefreshAuth0Adapter; use GuzzleHttp\Client; use Slim\Psr7\Factory\UriFactory; @@ -94,7 +94,7 @@ public function register(): void $this->addShared( LogOutServiceInterface::class, - fn (): LogOutAuth0Adapter => new LogOutAuth0Adapter( + fn (): LogOutOAuthAdapter => new LogOutOAuthAdapter( $this->get(Auth0::class), new Authentication( [ diff --git a/src/Infrastructure/Service/LogOutAuth0Adapter.php b/src/Infrastructure/Service/LogOutOAuthAdapter.php similarity index 96% rename from src/Infrastructure/Service/LogOutAuth0Adapter.php rename to src/Infrastructure/Service/LogOutOAuthAdapter.php index 3265305..67c2ad0 100644 --- a/src/Infrastructure/Service/LogOutAuth0Adapter.php +++ b/src/Infrastructure/Service/LogOutOAuthAdapter.php @@ -12,7 +12,7 @@ use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; -final class LogOutAuth0Adapter implements LogOutServiceInterface +final class LogOutOAuthAdapter implements LogOutServiceInterface { private ResponseFactoryInterface $responseFactory; diff --git a/tests/Infrastructure/Service/LogOutAuth0AdapterTest.php b/tests/Infrastructure/Service/LogOutOAuthAdapterTest.php similarity index 89% rename from tests/Infrastructure/Service/LogOutAuth0AdapterTest.php rename to tests/Infrastructure/Service/LogOutOAuthAdapterTest.php index daab448..83aecdc 100644 --- a/tests/Infrastructure/Service/LogOutAuth0AdapterTest.php +++ b/tests/Infrastructure/Service/LogOutOAuthAdapterTest.php @@ -12,7 +12,7 @@ use Prophecy\PhpUnit\ProphecyTrait; use Slim\Psr7\Factory\UriFactory; -final class LogOutAuth0AdapterTest extends TestCase +final class LogOutOAuthAdapterTest extends TestCase { use ProphecyTrait; @@ -28,7 +28,7 @@ public function it_logs_out_user(): void $authentication->getLogoutLink('http://foo-bar.com', ['clientId' => 'client-id'])->willReturn($auth0LogOutUri); - $auth0adapter = new LogOutAuth0Adapter( + $logOutOAuthAdapter = new LogOutOAuthAdapter( $auth0->reveal(), $authentication->reveal(), new SlimResponseFactory(), @@ -37,7 +37,7 @@ public function it_logs_out_user(): void 'client-id' ); - $response = $auth0adapter->logout(); + $response = $logOutOAuthAdapter->logout(); $this->assertEquals(StatusCodeInterface::STATUS_MOVED_PERMANENTLY, $response->getStatusCode()); $this->assertEquals($auth0LogOutUri, $response->getHeaderLine('Location'));