[英]Securing Jersey based REST service using oAuth 2.0
我使用 Jersey 庫在 java/netbeans 中創建了 RESTful 服務。 現在我想使用 oAuth 2.0 來保護這項服務。
是否有任何圖書館或任何教程來實現這一目標? 我在谷歌中找不到任何有用的東西。
您可以使用 Apache Oltu(以前稱為 Apache Amber): https ://cwiki.apache.org/confluence/display/OLTU/Documentation
授權服務器和資源服務器部分解釋了如何保護您的 REST 服務。
檢查此示例 Jersey + Oltu + Oauth: https ://bitbucket.org/dobromyslov/oauth2-example/src/
其工作原理的說明位於此處:
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-ii.html
我們使用了spring security,認為是最簡單最簡單的方法,查看這里了解更多信息:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.