-
-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #916 Allow to use custom authenticator by extending JWTAuthen…
…ticator (fd6130) This PR was squashed before being merged into the 2.x branch. Discussion ---------- Allow to use custom authenticator by extending JWTAuthenticator Fix #915 This PR will allow user to use their own custom authenticator that is extends from JWTAuthenticator. Currently allow one authenticator per firewall only. ```php namespace App\Security; use Lexik\Bundle\JWTAuthenticationBundle\Security\Authenticator\JWTAuthenticator; class CustomAuthenticator extends JWTAuthenticator { // Your own logic } ``` ```yaml # config/services.yaml services: app.custom_authenticator: class: App\Security\CustomAuthenticator parent: lexik_jwt_authentication.security.jwt_authenticator ``` ```yaml # config/packages/security.yaml security: # ... firewalls: # ... api: pattern: ^/api stateless: true jwt: authenticator: app.custom_authenticator ``` Commits ------- 5e6562c Allow to use custom authenticator by extending JWTAuthenticator
- Loading branch information
Showing
3 changed files
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters