Grails Acegi 手动登录
有没有办法在不使用“j_spring_security_check”的 POST 请求的情况下做到这一点?
Is there a way to do that without using a POST request to "j_spring_security_check"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我需要同样的东西(在我的例子中,我想在用户创建新帐户后登录用户),所以我在生成的 RegistrationService 中进行了挖掘,发现这就是它的完成方式:
希望有帮助。
注意:在我的示例中,我使用电子邮件/密码登录。
AuthToken
构造函数将您使用的任何内容作为您的用户名/密码。I needed the same thing (in my case I wanted to log in a user after they created a new account), so I dug around in the generated RegistrationService and found this is how it is done:
Hope that helps.
Note: In my example, I use the email/password to login. The
AuthToken
constructor takes whatever you us as your username/password.