Multiple JWT authenticators
ramard opened this issue · 0 comments
ramard commented
Hi,
I'm in the process of upgrading to symfony 5.3 and therefore no longer use the guard component.
I have a problem that I can't solve, which is the case of multiple JWT authenticators.
This is what I had in my configuration:
api:
pattern: ^/api/v1
stateless: true
anonymous: ~
provider: api
user_checker: App\Security\UserChecker\EnabledUserChecker
entry_point: app.jwt_cas_authenticator
guard:
authenticators:
- app.jwt_cas_authenticator
- app.jwt_local_authenticator
Here the two authenticators are services that inherit from the "lexik_jwt_authentication.jwt_token_authenticator" service.
If I follow the documentation (https://github.com/lexik/LexikJWTAuthenticationBundle/blob/2.x/Resources/doc/6-extending-jwt-authenticator.rst), it seems that it is no longer possible to specify several authenticators.
Is there any other way around this?
Thank you in advance for your answers.