diff --git a/app/modules/Smtp/Interfaces/Http/Controllers/DownloadAttachmentAction.php b/app/modules/Smtp/Interfaces/Http/Controllers/DownloadAttachmentAction.php index 7f7a743f..37164da8 100644 --- a/app/modules/Smtp/Interfaces/Http/Controllers/DownloadAttachmentAction.php +++ b/app/modules/Smtp/Interfaces/Http/Controllers/DownloadAttachmentAction.php @@ -23,7 +23,7 @@ public function __construct( ) { } - #[Route(route: 'smtp//attachment/', name: 'smtp.attachment.download', group: 'api')] + #[Route(route: 'smtp//attachment/', name: 'smtp.attachment.download', group: 'api_guest')] public function __invoke( QueryBusInterface $bus, ResponseWrapper $responseWrapper, diff --git a/app/src/Application/Auth/JWTTokenStorage.php b/app/src/Application/Auth/JWTTokenStorage.php index 96f88e95..53925e99 100644 --- a/app/src/Application/Auth/JWTTokenStorage.php +++ b/app/src/Application/Auth/JWTTokenStorage.php @@ -64,7 +64,7 @@ public function create(array $payload, \DateTimeInterface $expiresAt = null): To ]; return new Token( - JWT::encode($token,$this->secret,$this->algorithm), + JWT::encode($token, $this->secret, $this->algorithm), $token, $payload, $issuedAt, diff --git a/app/src/Application/Bootloader/RoutesBootloader.php b/app/src/Application/Bootloader/RoutesBootloader.php index 595897f6..2f190245 100644 --- a/app/src/Application/Bootloader/RoutesBootloader.php +++ b/app/src/Application/Bootloader/RoutesBootloader.php @@ -59,6 +59,9 @@ protected function middlewareGroups(): array 'web' => [ 'middleware:auth', ], + 'web_guest' => [ + 'middleware:auth', + ], 'api' => [ 'middleware:auth', ], @@ -102,7 +105,7 @@ protected function defineRoutes(RoutingConfigurator $routes): void ->action(DocumentationController::class, 'yaml'); $routes->default('/') - ->group('web') + ->group('web_guest') ->action(EventHandlerAction::class, 'handle'); } } diff --git a/app/src/Application/OAuth/SessionStore.php b/app/src/Application/OAuth/SessionStore.php index 51b7f69d..4d1b4430 100644 --- a/app/src/Application/OAuth/SessionStore.php +++ b/app/src/Application/OAuth/SessionStore.php @@ -5,12 +5,12 @@ namespace App\Application\OAuth; use Auth0\SDK\Contract\StoreInterface; -use Spiral\Session\SessionInterface; +use Spiral\Session\SessionScope; final class SessionStore implements StoreInterface { public function __construct( - private readonly SessionInterface $session, + private readonly SessionScope $session, private readonly string $sessionPrefix = 'auth0', ) { }