[英]Securing Jersey based REST service using oAuth 2.0
I have created RESTful services in java/netbeans using the Jersey Library.我使用 Jersey 库在 java/netbeans 中创建了 RESTful 服务。 Now i want to secure this service using oAuth 2.0.
现在我想使用 oAuth 2.0 来保护这项服务。
Are there any libraries or any tutorial to achieve that?是否有任何图书馆或任何教程来实现这一目标? I couldn't find anything useful in google.
我在谷歌中找不到任何有用的东西。
You can use Apache Oltu (formerly Apache Amber): https://cwiki.apache.org/confluence/display/OLTU/Documentation您可以使用 Apache Oltu(以前称为 Apache Amber): https ://cwiki.apache.org/confluence/display/OLTU/Documentation
The Authorization Server and Resource Server sections explain how to secure your REST services.授权服务器和资源服务器部分解释了如何保护您的 REST 服务。
Check this example Jersey + Oltu + Oauth: https://bitbucket.org/dobromyslov/oauth2-example/src/检查此示例 Jersey + Oltu + Oauth: https ://bitbucket.org/dobromyslov/oauth2-example/src/
Explanation how it works is located here:其工作原理的说明位于此处:
http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-i.html http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-i.html
And here:和这里:
http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-ii.html http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-ii.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.