- Install package using composer
composer require cosmonova-rnd/jwt-guard
-
Configure environment variables
JWT_PUBLIC_KEY
andJWT_PASSPHRASE
with public key and passphrase -
Add to your firewall new authenticator
example:
security:
main:
anonymous: ~
guard:
authenticators:
- CosmonovaRnD\JWTGuard\Security\JwtAuthenticator
Use symfony UserInterface to get authenticated user
@ Cosmonova | Research & Development