-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
LexikJWTAuthentication bridge #563
Comments
Why not, but IMO a converter from JSON to form encoded is a bad implementation. I would prefer a security listener dealing directly with the JSON object like https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php but parsing the JSON directly. IMO such listener should be in the bundle from Lexik or in Symfony core, not in API Platform core (because it can be useful in other cases, like when using a pure SF app). What do you think @slashfan. |
See symfony/symfony#18952. Tests and feedback are welcome! Closing this one, please comment on the Symfony PR. |
This PR was squashed before being merged into the 3.3-dev branch (closes #18952). Discussion ---------- [Security] Add a JSON authentication listener | Q | A | | --- | --- | | Branch? | master | | Bug fix? | no | | New feature? | yes | | BC breaks? | no | | Deprecations? | no | | Tests pass? | yes | | Fixed tickets | n/a | | License | MIT | | Doc PR | symfony/symfony-docs#7081 | Add a new authentication listener allowing to login by sending a JSON document like: `{"_username": "dunglas", "_password": "foo"}`. It is similar to the traditional form login (but take a JSON document as entry) and is convenient for APIs, especially used in combination with JWT. See api-platform/core#563 and lexik/LexikJWTAuthenticationBundle#123 (comment) for previous discussions. - [x] Add functional tests in security bundle Commits ------- 02178bc [Security] Add a JSON authentication listener
What about a LexikJWTAuthenticatio bridge to allow credentials to be sent as JSON object (FOSRestBundle support it).
See : lexik/LexikJWTAuthenticationBundle#123 (comment)
The text was updated successfully, but these errors were encountered: