使用Spring Security和Jersey Restful Web Services登录身份验证

时间:2012-12-24 11:05:54

标签: spring rest spring-security jersey

我是Jersey Restful网络服务和Spring Security的新成员。

我创建了一个移动应用程序,其中使用Jersey restful web services和JAVA从后端获取数据。 现在我们正在集成一个登录页面。对于身份验证,我们将使用Spring Security DB身份验证。 没有在google上找到基于jersey和Spring Security登录的解决方案

我的其他网址将是这样的:

http://localhost:6060/Myapp/REST/services/Login;userName=abcd;password=xxxx

我不知道如何使用Spring Security来处理这个问题。

1 个答案:

答案 0 :(得分:1)

您可以使用servlet filterspring mvc interceptor从请求中提取凭据。

如果凭据有效,您可以通过updating the authentication object

以编程方式登录用户