Return username and password to login form grails spring security

前端 未结 3 2294
说谎
说谎 2020-12-06 22:43

When a user fails authentication, I want the username and password to be returned to the form. I\'m using the spring security core plugin with Grails and Spring Security LD

3条回答
  •  感动是毒
    2020-12-06 23:17

    I was able to do the following to get the username back to the form: In LoginController.groovy:

            render view: view, model: [postUrl: postUrl,
                                   rememberMeParameter: config.rememberMe.parameter,
                                   lastUsername: request.getSession().getAttribute("SPRING_SECURITY_LAST_USERNAME")]
    

提交回复
热议问题