我是春季保安的新人。在我的实际应用中没有spring,它有一些认证的方法,例如,一些系统使用xml文档认证,其他系统使用带参数的url认证,其他系统使用webservices认证,其他系统使用json文档认证。在我新的spring安全应用程序中,目前只能通过登录表单进行身份验证,但我尝试绕过登录表单,来实现其他的身份验证,但目前我不知道该怎么做。有没有人能帮我实现其他身份验证?
诚挚的问候
发布于 2016-08-09 00:39:46
您需要“多身份验证提供程序”。看看这些文档,它解释了如何使用登录表单和Restful进行身份验证:
Spring security for both web services and users
https://blog.codecentric.de/en/2012/07/spring-security-two-security-realms-in-one-application/
Spring security with multiple authentication providers - UsernameNotFoundException
http://www.networkedassets.com/configuring-spring-security-for-a-restful-web-services/
发布于 2016-08-12 19:43:07
第四个链接适用于我,当我在我的导航器http://localhost:8080/rresclick/apiloginuser?username=username&password=password中设置时,我可以很好地进行身份验证,并且不会显示登录表单。在认证之后,它被传给了控制器。现在,当我收到一个带有用户名和密码的xml文档时,我不想显示登录表单。它也做了同样的事情。
https://stackoverflow.com/questions/38793809
复制相似问题