Announcement Announcement Module
Collapse
No announcement yet.
Using Spring MVC SimpleFormController for login form? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Spring MVC SimpleFormController for login form?

    Is it possible to use the standard Spring SimpleFormController along with Acegi to control the login form? So... in the AuthenticationProcessingFilterEntryPoint bean, the loginFormUrl would be /login.html or some URL managed by Spring MVC.

    The problem I am having is how to direct the login information to the url managed by Acegi as specified in the AuthenticationProcessingFilter.filterProcessesUrl attribute.

    This is probably a simple solution but for some reason, I am not seeing it.

    Thanks!

  • #2
    Re: Using Spring MVC SimpleFormController for login form?

    Originally posted by therring
    Is it possible to use the standard Spring SimpleFormController along with Acegi to control the login form?
    Yes, although why do you wish to do this?

    Originally posted by therring
    So... in the AuthenticationProcessingFilterEntryPoint bean, the loginFormUrl would be /login.html or some URL managed by Spring MVC.
    AuthenticationProcessingFilterEntryPoint would be the URL your SimpleFormController is configured to process. The SimpleFormController will return a ModelAndView which specifies the login form view.

    Originally posted by therring
    The problem I am having is how to direct the login information to the url managed by Acegi as specified in the AuthenticationProcessingFilter.filterProcessesUrl attribute.
    This post might help:

    http://forum.springframework.org/showthread.php?t=17348
    Last edited by robyn; May 14th, 2006, 08:30 PM.

    Comment


    • #3
      Thanks for the response. I reviewed the link that you sent and re-though the approach that I was taking.

      It doesn't seem like the SimpleFormController will be the best class for the job. Since it handles both the rendering of the view and the processing of the form (from the POST).

      I have built a controller that extends the plain ol AbstractController which simply renders the login form. Then the html <form> submits to the Acegi managed j_acegi_security_check.

      Does this sound like the best approach?

      Thanks again...

      Comment


      • #4
        Originally posted by therring
        I have built a controller that extends the plain ol AbstractController which simply renders the login form. Then the html <form> submits to the Acegi managed j_acegi_security_check.

        Does this sound like the best approach?
        Sounds fine.

        Comment

        Working...
        X