From f6ef35c76be4d4f14f906f2dd5f236297f9384fa Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Wed, 8 Jun 2022 17:12:53 +0100 Subject: [PATCH] Comment out currently-unused class Once the issue with slim-jwt-auth is fixed (see https://github.com/tuupola/slim-jwt-auth/issues/217), we can reinstate that library as the JWT solution as follows: * Add tuupola/slim-jwt-auth back into composer.json * Remove tuupola/http-factory and tuupola/callable-handler (these are dependencies of tuupola/slim-jwt-auth and will be installed by that library; we no longer need to reference them directly once slim-jwt-auth is back in place) * Uncomment body of App\Middleware\Session\JwtAuthenticationFactory class * Remove App\Middleware\Session\JwtMiddleware file * Remove App\Middleware\Session\JwtMiddlewareFactory file * Uncomment lines 67-68 and remove lines 69-70 of ConfigProvider.php For more context, see commit 3efaa3bed in this repo. --- .../App/src/Middleware/Session/JwtAuthenticationFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service-admin/src/App/src/Middleware/Session/JwtAuthenticationFactory.php b/service-admin/src/App/src/Middleware/Session/JwtAuthenticationFactory.php index afde18ebdc..5183b38873 100644 --- a/service-admin/src/App/src/Middleware/Session/JwtAuthenticationFactory.php +++ b/service-admin/src/App/src/Middleware/Session/JwtAuthenticationFactory.php @@ -19,7 +19,7 @@ class JwtAuthenticationFactory * @param ContainerInterface $container * @return JwtAuthentication */ - public function __invoke(ContainerInterface $container) + /*public function __invoke(ContainerInterface $container) { $jwtConfig = $container->get('config')['jwt']; @@ -45,5 +45,5 @@ public function __invoke(ContainerInterface $container) ]; return new JwtAuthentication(array_merge($jwtConfig, $jwtHandlers)); - } + }*/ }