OAuth 2.0 implementation

Demian Brecht demianbrecht at gmail.com
Mon Mar 26 22:42:38 EDT 2012


Hi all,

I'm getting close to an alpha release of an OAuth 2.0 implementation (https://github.com/demianbrecht/py-sanction). High level features include:

* Support for multiple providers (protocol deviations). This didn't seem to be supported by any library.
* Actually an OAuth 2.0 implementation (python-oauth2 is a 2nd version of python-oauth, not an OAuth 2.0 implementation)
* Support for the entire OAuth 2.0 spec. Most provide support for the authorization code grant flow (employed by all web server providers), but lacked support or extensibility for any other flows, credentials or other provider extensions)
* 100% unit test coverage. Some employ TDD, others didn't.

Current implementation includes support for Authorization Code Grant flow but can be extended to support others (including extensions) quite trivially.

Current adapter implementations include:

* Google
* Facebook
* Stack Exchange
* Deviant Art
* Foursquare

It has yet to be heavily used or functionally tested (basic tests have been done in example/server.py) and documentation is being worked on.

Just wanted to share some of my work and hopefully someone other than me can find some use for it :)


P.S. For those interested, cloc stats are:

http://cloc.sourceforge.net v 1.53  T=0.5 s (28.0 files/s, 1818.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Python                          14            239            196            474
-------------------------------------------------------------------------------
SUM:                            14            239            196            474
-------------------------------------------------------------------------------



More information about the Python-list mailing list