discoverygarden/crayfish-commons-syn
symfony/security-bundle).lexik/jwt-authentication-bundle).AuthenticatorInterface with Laravel’s Authenticatable.EventDispatcher (Laravel has a compatible Illuminate\Events system).Authenticatable and Symfony’s AuthenticatorInterface differ. Custom glue code will be needed to adapt the authenticator.EventDispatcher is used for JWT events (e.g., security.authentication.success). Laravel’s Events system is similar but not identical.tenancy package). The package assumes Symfony’s RequestStack for tenant resolution.request()->tenant()).RequestStack; Laravel may need custom tenant extraction.EventDispatcher acceptable?
symfony/security-bundle (for AuthenticatorInterface).lexik/jwt-authentication-bundle (JWT core).AuthManager to bridge Laravel’s Auth facade with Symfony’s AuthenticationUtils.tenant-middleware) to set the tenant context before JWT validation.islandora_crayfish_commons_syn.jwt.authenticator to resolve tenants via Laravel’s request context.composer require symfony/security-bundle lexik/jwt-authentication-bundle discoverygarden/crayfish-commons-syn
config/bundles.php (Laravel’s Symfony bridge).app/Http/Middleware/JwtAuthenticate.php) that:
Authorization header.public function handle(Request $request, Closure $next) {
$authenticator = app()->make('islandora_crayfish_commons_syn.jwt.authenticator');
$token = $request->bearerToken();
$authResult = $authenticator->authenticate(new Request($request->toArray(), [], [], [], [], $request->server()), new MockHttpFoundationRequest($request));
if ($authResult->isAuthenticated()) {
auth()->login($authResult->getUser());
}
return $next($request);
}
request()->tenant()).JwtAuthenticate to set the context.security.authentication.success to Laravel’s auth.login or a custom event.security.yaml requirements into Laravel’s config/security.php (or equivalent).'security' => [
'enable_authenticator_manager' => true,
'providers' => [
'users' => [
'memory' => [], // Placeholder; replace with Laravel user provider
],
],
'firewalls' => [
'main' => [
'anonymous' => false,
'provider' => 'users',
'custom_authenticators' => [
'islandora_crayfish_commons_syn.jwt.authenticator',
],
],
],
],
RequestStack) require adaptation.stancl/tenancy).How can I help you explore Laravel packages today?