-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Security] Add remember me option for JSON logins #48899
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
[Security] Add remember me option for JSON logins #48899
Conversation
|
Hey! To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done? Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review. Cheers! Carsonbot |
|
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
src/Symfony/Component/Security/Http/EventListener/CheckRememberMeConditionsListener.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Http/EventListener/CheckRememberMeConditionsListener.php
Outdated
Show resolved
Hide resolved
8350f8d to
8b257c9
Compare
nicolas-grekas
left a comment
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.
I rebased the PR and more importantly I added a second commit to pass remember-me parameters via RememberMeBadge.
8b257c9 to
5fe525f
Compare
|
Thank you @baumerdev. |
|
@baumerdev It would be nice if you could take Nicolas' commit into account for your doc PR 🙏 |
This PR was merged into the 6.3 branch. Discussion ---------- [Security] Remember me JSON Login Add block with description, how to set up remember me functionality for JSON Login Issue symfony/symfony#40918 Pull Request symfony/symfony#48899 Commits ------- 4397755 Add JSON login remember me symfony/symfony#48899
This resolves the above mentioned issue by adding a
RememberMeBadgetoJsonLoginAuthenticatorand by extendingCheckRememberMeConditionsListenerto be able to read the remember me parameter from a JSON request body (if reading from ParameterBag was unsuccessful).This means you can send a JSON request with a body like this and needn‘t use a fallback HTTP form login when building your API:
{ "username": "dunglas", "password": "MyPassword", "_remember_me": true }