Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple JWT authenticators #1206

Open
ramard opened this issue Feb 18, 2024 · 0 comments
Open

Multiple JWT authenticators #1206

ramard opened this issue Feb 18, 2024 · 0 comments

Comments

@ramard
Copy link

ramard commented Feb 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant