Implementing OAuth in Java

I am looking for an open source library that implements the OAuth protocol, I need a server side implementation. Let's say I have a social network system and I want to provide my users with OAuth abiliy for my API, for example facebook.

Do you have any suggestions, true examples.

+4
source share
4 answers

Here are some Java libraries,

http://oauth.net/code/

You must use the first one. This is the only server with server support. You can find an example,

http://oauth.googlecode.com/svn/code/java/example/oauth-provider/

You can also watch OAuth 2.0,

http://tools.ietf.org/html/draft-ietf-oauth-v2-02

This greatly simplifies the OAuth stream, and you do not need a library to implement it.

+4
source

You can try https://github.com/apifest/apifest-oauth20 It is written in Java and uses Netty as a server. It currently uses Hazelcast (default), MongoDB, or Redis as storage. In addition, you can easily add another backend storage.

+1
source

http://code.google.com/p/oauth/ is a reference library, as well as http://github.com/fernandezpablo85/scribe as an alternative.

0
source

If you want to implement oauth server using Java Spring technologies.

Here is an implementation using Spring Boot.

https://github.com/dsyer/sparklr-boot

0
source

Source: https://habr.com/ru/post/1309256/


All Articles