Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing OAuth provider in Java

What is the fastest/easiest way to get an OAuth provider running in Java? Specifically, I need to authorize third-party apps to access certain web services (I'm thinking token authentication using OAuth).

I've been looking at Jersey's OAuth extension, but as mentioned here, it doesn't provide a full-fledged Service Provider.

like image 446
jay_soo Avatar asked Jan 27 '10 22:01

jay_soo


People also ask

How does OAuth work in Java?

One of OAuth's key patterns is a resource server. A resource server accepts an access token. If the token is valid, it gives a client access to the resource owner's data. In this example, a client is an app, the resource owner is a user, and the resource server is the Java API you develop.

How does OAuth works in spring boot?

The app you just wrote, in OAuth 2.0 terms, is a Client Application, and it uses the authorization code grant to obtain an access token from GitHub (the Authorization Server). It then uses the access token to ask GitHub for some personal details (only what you permitted it to do), including your login ID and your name.


1 Answers

There are a few Java libraries out there for OAuth. Specifically, I'd have a look at this one. I haven't used it myself, but there is an example for running an OAuth Service Provider.

There's a list of libraries available on the OAuth website: http://oauth.net/code

like image 124
Paul Osman Avatar answered Oct 09 '22 05:10

Paul Osman