Skip to content

Add documentation for form_login handlers #6493

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

Closed
samsch opened this issue Apr 19, 2016 · 4 comments
Closed

Add documentation for form_login handlers #6493

samsch opened this issue Apr 19, 2016 · 4 comments
Labels

Comments

@samsch
Copy link

samsch commented Apr 19, 2016

In the security reference, under form_login there are success_handler and failure_handler keys which can be set to services. There doesn't seem to by any other documentation about this functionality.

What needs to be documented:

  • What interfaces to implement (AuthenticationSuccessHandlerInterface, AuthenticationFailureHandlerInterface)
  • When these handlers are called (immediately after login success, I assume)
  • Whether there is a default (yes), and whether you are replacing this default or adding an additional listener (replacing, I think)
  • Basic example of usage

My basic example of usage is to add a cookie to the default redirect response. To do this, I extend the DefaultAuthenticationSuccessHandler, override onAuthenticationSuccess to call the parent and get the response, modify the response, and return it.

@linaori
Copy link
Contributor

linaori commented Apr 19, 2016

Closely related to #5139.

@samsch
Copy link
Author

samsch commented Apr 21, 2016

Looks like logout.handlers also needs this documentation. Should that be a new issue, or just leave it here?

logout.success_handler has a note in the book pointing you to the correct interface to implement, which in theory should be enough information to use it. At the same time, if you already have the other handlers all in one place, it would hurt to have it too.

@linaori
Copy link
Contributor

linaori commented Apr 25, 2016

It basically comes down to needing a full block for the firewall configuration with proper explanation. I noticed the user_checker configuration is also missing for the firewalls.

@wouterj wouterj added the hasPR A Pull Request has already been submitted for this issue. label May 20, 2016
@wouterj wouterj removed the hasPR A Pull Request has already been submitted for this issue. label Jul 8, 2016
@javiereguiluz
Copy link
Member

Thanks for reporting this! It's true that this is missing, but I'm closing this issue as a duplicate of #4258.

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

No branches or pull requests

5 participants