-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
JSON authentication listener docs #7081
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
Conversation
@javiereguiluz great improvement, thanks! |
|
||
.. tip:: | ||
|
||
If you are storing users in some sort of a database, then you should consider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really relevant here ? IMHO it does not have specifically much to do with the current article :/
the following JSON document as body, the security system will automatically | ||
check the user's credentials and either authenticate the user or throw an error:: | ||
|
||
.. code-block:: json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, this block does not render well: http://pr-7081-acxnhhi-6qmocelev2lwe.eu.platform.sh/security/json_login_setup.html
(probably because of the double colon L.149)
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@dunglas thanks for implementing this nice feature and thanks for providing the docs.
Thank you very much for all these improvements @javiereguiluz |
This PR was merged into the master branch. Discussion ---------- JSON authentication listener docs Docs for symfony/symfony#18952. Commits ------- b192ab3 Fixed a syntax issue 16ae3f6 Reworded and simplified the article 820f28e Fixed the name of the "username" property 6d018f6 Fixed a syntax error ab5259b Removed a tip which is not too relevant for the article d2dd895 Fixed the JSON format (this time for real) 6ff24da Fixed the JSON format 0961128 Show the simple example first and then explain the complex use case 68bd9a5 JSON authentication listener docs
Thank you Kevin. I have merged your PR and made some minor tweaks in af1fb6b. Let me know if you disagree with any of them. |
Docs for symfony/symfony#18952.