Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oauth using Jersey server side example? [duplicate]

I have created RESTful services in java/netbeans using the Jersey Library. Now i want to secure this service using oAuth 2.0.

Are there any libraries or any tutorial to achieve that? I couldn't find anything useful in google.

like image 543
orak Avatar asked Jul 20 '12 11:07

orak


3 Answers

You can use Apache Oltu (formerly Apache Amber): https://cwiki.apache.org/confluence/display/OLTU/Documentation

The Authorization Server and Resource Server sections explain how to secure your REST services.

like image 55
Lukasz Moren Avatar answered Oct 22 '22 13:10

Lukasz Moren


Check this example 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

And here:

http://www.jasondl.ee/posts/2013/a-simple-oauth2-client-and-server-example-part-ii.html

like image 34
Viacheslav Dobromyslov Avatar answered Oct 22 '22 14:10

Viacheslav Dobromyslov


We used spring security, think is the simple and easiest way, look here for more information:

like image 43
shem Avatar answered Oct 22 '22 15:10

shem