From 8dceb363cb5cccc733fdfc3cfc31f5caffdcb62a Mon Sep 17 00:00:00 2001 From: Patrick Kerrigan Date: Fri, 12 Dec 2025 11:42:00 +0000 Subject: [PATCH] Update example DI mappings for new Dilex version --- config/mappings.authentication.example.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/mappings.authentication.example.php b/config/mappings.authentication.example.php index eb07f4d..2c6c581 100644 --- a/config/mappings.authentication.example.php +++ b/config/mappings.authentication.example.php @@ -1,8 +1,10 @@ fn () => new \Firebase\JWT\Key("{{ encryption_secret_key }}", "HS512"), - \Clearbooks\Dilex\JwtGuard\RequestAuthoriser::class => \Di\autowire(\Clearbooks\Dilex\JwtGuard\JwtTokenAuthenticator::class), + \Clearbooks\Dilex\JwtGuard\RequestAuthoriser::class => \Di\factory(static fn ($c) => new \Clearbooks\Dilex\JwtGuard\JwtTokenAuthenticator( + key: new \Firebase\JWT\Key("{{ encryption_secret_key }}", "HS512"), + appIdProvider: $c->get(\Clearbooks\Dilex\JwtGuard\AppIdProvider::class) + )), \Clearbooks\Dilex\JwtGuard\IdentityProvider::class => \Di\get(\Clearbooks\Dilex\JwtGuard\RequestAuthoriser::class), \Clearbooks\Dilex\JwtGuard\AppIdProvider::class => fn() => new \Clearbooks\Dilex\JwtGuard\StaticAppIdProvider(["{{ labs_app_id }}"]), \Clearbooks\LabsApi\Cors\AllowedOrigins::class => fn () => new \Clearbooks\LabsApi\Cors\AllowedOrigins(['{{ cors_allowed_origin }}'])