Skip to content

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

Merged
merged 9 commits into from
Dec 14, 2016
Merged

JSON authentication listener docs #7081

merged 9 commits into from
Dec 14, 2016

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Oct 25, 2016

@javiereguiluz
Copy link
Member

@dunglas in 0961128 I propose to change the order in which some things are explained. It's only a proposal. If you don't agree, let's forget about it (I created a commit directly because it's easier to understand than commenting a lot of lines in your original commit).

@dunglas
Copy link
Member Author

dunglas commented Oct 25, 2016

@javiereguiluz great improvement, thanks!


.. tip::

If you are storing users in some sort of a database, then you should consider
Copy link
Contributor

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
Copy link
Contributor

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)

@xabbuh xabbuh added the On hold label Oct 25, 2016
@xabbuh xabbuh added this to the 3.3 milestone Nov 7, 2016
fabpot added a commit to symfony/symfony that referenced this pull request Dec 3, 2016
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
Copy link
Member

@javiereguiluz javiereguiluz left a 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.

@dunglas
Copy link
Member Author

dunglas commented Dec 5, 2016

Thank you very much for all these improvements @javiereguiluz

@xabbuh xabbuh merged commit b192ab3 into symfony:master Dec 14, 2016
xabbuh added a commit that referenced this pull request Dec 14, 2016
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
xabbuh added a commit that referenced this pull request Dec 14, 2016
@xabbuh
Copy link
Member

xabbuh commented Dec 14, 2016

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.

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

Successfully merging this pull request may close these issues.

5 participants