如何使用 Jersey 实现 Spring OAuth 安全性?
我想在服务器端和客户端的球衣 Restful Web 服务上实现 Spring Security。 目标是当用户想要访问受保护的资源时保证用户授权和身份验证。我尝试了一种解决方案,在服务器端实现 ConsumerDetailsService 和 UserDetailsService 接口,并在客户端使用 CoreOAuthConsumerSupport(调用 readProtectedResource)。 这是可行的,但问题是它没有利用球衣客户端的优势,例如将数组作为参数传递。
是否有 OAuth 的 Jersey 客户端实现?
I want to implement spring security on a jersey Restful web service, both on server and client side.
The goal is to guarantee user authorization and authentication when he wants to access a protected ressource. I tried a solution by implementing the ConsumerDetailsService and UserDetailsService interfaces on server side and used a CoreOAuthConsumerSupport on client side(calling readProtectedResource).
This works, but the problem is that is doesnot take advantages of the jersey client, for example for passing an array as parameter.
Is there a Jersey client implementation of OAuth?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,Jersey 在服务器端和客户端都支持 OAuth。请参阅以下 javadoc 页面:
OAuth 服务器< /a>
OAuth 客户端
OAuth 核心类
有Jersey 示例下还有一个使用 OAuth 的 twitter 客户端示例应用程序:http://java.net /projects/jersey/sources/svn/show/trunk/jersey/samples/oauth-client-twitter?rev=5569
Yes, Jersey has support for OAuth on both the server and the client side. See the following javadoc pages:
OAuth Server
OAuth Client
OAuth core classes
There is also a twitter client sample application under Jersey samples that uses OAuth: http://java.net/projects/jersey/sources/svn/show/trunk/jersey/samples/oauth-client-twitter?rev=5569