Implementing Python-OAuth2

Jack Diederich jackdied at gmail.com
Wed Oct 12 00:07:05 EDT 2011


On Thu, Oct 6, 2011 at 12:15 PM, Jeff Gaynor <jgaynor at ncsa.illinois.edu> wrote:
> On 10/06/2011 08:34 AM, Kayode Odeyemi wrote:

>> I'm working on a pretty large application that I will like to use oauth2
>> on as an authentication and authorization mechanism.
>
> There are *no* usable OAuth version 2..0 implementation in any language
> (usually Java comes first) that I know of, so you will get to role your own,
> which is hard. There are a few beta-level versions E.g. Twitter) but these
> are special cased to the author's needs. The spec itself is not quite ready
> either and since it has changed quite substantially in the last year, I
> suspect that everyone is waiting to see it settle to a steady state.

I got bit hard by oauth libraries, especially because pre-OAuth2.0
someone started a forked OAuth1.0 library and named it "oauth2".  Lots
of forked copies of that one pollute the searches.

Google has one but it is impossibly over engineered - 15,000 lines of
code in a hundred files.  I got frustrated and wrote one that only
does 2.0 "bearer token" and has only been tested against goo.gl (the
google URL shortener).  But it works for me, weighs in at 200 lines of
code, and only needs stdlib + json libraries.  Using the official
google API required me to write more than 200 lines of code, so I'm a
happy camper.

https://github.com/jackdied/python-foauth2

Patches-welcome-ly,

-Jack

NB, the name can be pronounced "faux-auth 2" or "Eff Oauth 2" at your
discretion.



More information about the Python-list mailing list