我有春季安全措施,通过login.jsp登录工作完全正常.
现在,我必须根据URL自动获取用户登录(类似于单点登录).我基本上在URL中有一个路径参数,它基本上是一个加密代码,我处理这个代码来进行自动登录.
我正在修改我的LoginController以检查我是否有一个有效的路径参数使用我的用户名和密码,使用这个用户名和密码我正在做 "forward:/j_spring_security_check?j_username="+username+"&j_password="+password
这会将我引导至login.jsp,并显示以下错误 Your login attempt was not successful, try again. Caused : Authentication method not supported: GET
我也试过"redirect:/j_spring_security_check?j_username="+username+"&j_password="+password但没有帮助.
来电/j_spring_security_check是一个POST,但forward:与redirect:正在做GET的,所以我怎么能分派到/j_spring_security_check的POST从我的LoginController?
谢谢