diff --git a/app/ActionServiceProvider.php b/app/ActionServiceProvider.php index a442984..ed110cd 100644 --- a/app/ActionServiceProvider.php +++ b/app/ActionServiceProvider.php @@ -25,7 +25,7 @@ use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\ExtractClientInformationFromRequest; 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\LoginOAuthAdapter; use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\LogOutOAuthAdapter; use CultuurNet\UDB3\JwtProvider\Infrastructure\Service\RefreshAuth0Adapter; use GuzzleHttp\Client; @@ -118,7 +118,7 @@ public function register(): void $this->addShared( LoginServiceInterface::class, - fn (): LoginAuth0Adapter => new LoginAuth0Adapter( + fn (): LoginOAuthAdapter => new LoginOAuthAdapter( $this->get(Auth0::class) ) ); diff --git a/src/Infrastructure/Service/LoginAuth0Adapter.php b/src/Infrastructure/Service/LoginOAuthAdapter.php similarity index 96% rename from src/Infrastructure/Service/LoginAuth0Adapter.php rename to src/Infrastructure/Service/LoginOAuthAdapter.php index 448f94e..69ab996 100644 --- a/src/Infrastructure/Service/LoginAuth0Adapter.php +++ b/src/Infrastructure/Service/LoginOAuthAdapter.php @@ -14,7 +14,7 @@ use Psr\Http\Message\ResponseInterface; use Slim\Psr7\Response; -final class LoginAuth0Adapter implements LoginServiceInterface +final class LoginOAuthAdapter implements LoginServiceInterface { private Auth0Interface $auth0; diff --git a/tests/Infrastructure/Service/LoginAuth0AdapterTest.php b/tests/Infrastructure/Service/LoginOAuthAdapterTest.php similarity index 91% rename from tests/Infrastructure/Service/LoginAuth0AdapterTest.php rename to tests/Infrastructure/Service/LoginOAuthAdapterTest.php index 6567918..7099a55 100644 --- a/tests/Infrastructure/Service/LoginAuth0AdapterTest.php +++ b/tests/Infrastructure/Service/LoginOAuthAdapterTest.php @@ -14,7 +14,7 @@ use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -final class LoginAuth0AdapterTest extends TestCase +final class LoginOAuthAdapterTest extends TestCase { use ProphecyTrait; @@ -25,7 +25,7 @@ public function it_redirects_to_login_page(): void { $auth0 = $this->prophesize(Auth0Interface::class); - $auth0adapter = new LoginAuth0Adapter( + $auth0adapter = new LoginOAuthAdapter( $auth0->reveal() ); @@ -49,7 +49,7 @@ public function it_returns_token(): void { $auth0 = $this->prophesize(Auth0Interface::class); - $auth0adapter = new LoginAuth0Adapter( + $auth0adapter = new LoginOAuthAdapter( $auth0->reveal() ); @@ -66,7 +66,7 @@ public function it_returns_refresh_token(): void { $auth0 = $this->prophesize(Auth0Interface::class); - $auth0adapter = new LoginAuth0Adapter( + $auth0adapter = new LoginOAuthAdapter( $auth0->reveal() ); @@ -84,7 +84,7 @@ public function it_wraps_auth0_exceptions_to_unsuccessful_auth_exception(Excepti { $auth0 = $this->prophesize(Auth0Interface::class); - $auth0adapter = new LoginAuth0Adapter( + $auth0adapter = new LoginOAuthAdapter( $auth0->reveal() );