Feedly OAuth 2.0 implementation using Scribe in Java
Since the Google Reader retirement, Feedly hasb been slowly becoming more and more popular. Recently, Feedly announced their API Model which allows developers to create apps which integrate with feedly. Applications authenticate users using a feedly OAuth 2.0 interface. In this post, I am going to cover the Feedly OAuth 2.0 authentication flow which can be used in Mobile/Web apps. I am not going to cover any details into OAuth 2. The official specs of OAuth2 can be read here and a nice tutorial here on Code Academy. Wikipedia too gives a nice little intro about OAuth 2 given below:
Quoting from Wikipedia
OAuth is an open standard for authorization. OAuth provides client applications a ‘secure delegated access’ to server resources on behalf of a resource owner. It specifies a process for resource owners to authorize third-party access to their server resources without sharing their credentials. OAuth is a service that is complementary to, and therefore distinct from, OpenID. OAuth is also distinct from OATH, which is a reference architecture for authentication, not a standard.
Since, I am using Java platform, I will be using a nice little OAuth library called Scribe. It is an open source library hosted on github and is a great resource to learn about OAuth 2.0 flow and specs. Basically, to implement any OAuth 2.0 API, you need to extend a class called DefaultApi20
and provide some of the obvious parameters such as Authorization Url
, Access token URL
and client id
and secret
.
The implementation of this class is maintained in my fork of Scribe repo. This is the direct link to the sources file. Feel free to use it to build awesome feedly Apps.
I also created a test Java Program. And here is the output of running the test: