views:

232

answers:

1

Hi,

I have followed a number of tutorials and examples on the web to setup and use django piston. They all work flawlessly, until i try to integrate oauth authentication. I have been working against the following examples:

http://blog.carduner.net/2010/01/26/django-piston-and-oauth/ http://github.com/clemesha/django-piston-oauth-example

Yet both of these seem to fail to include examples of the required oauth templates and views. It is quite likely that i'm just not implementing it properly, so any advice would be hugely helpful.

In summary. I have a working django piston setup (that returns / inserts data). What i am struggling with is a definitive guide to integrating oauth authentication. I.e. what do i need to install, which views, settings, url patterns and templates do i need to create?

Thanks

A: 

If you're using a released version of Piston, you might be interested in how we implemented OAuth in Snowy, our AGPL web app for Tomboy notes:

http://git.gnome.org/browse/snowy/tree/urls.py#n48

http://git.gnome.org/browse/snowy/tree/api/urls.py

http://git.gnome.org/browse/snowy/tree/api/templates/piston/authorize_token.html

http://git.gnome.org/browse/snowy/tree/api/handlers.py

The OAuth views are bundled with piston (in the released version).

I have yet to upgrade to prencher's improved OAuth fork (which will apparently turn into 0.3 soon?), but here are his instructions if you are using his code:

http://groups.google.com/group/django-piston/msg/5a148c8e33654c5d

(make sure to read all of his responses in that thread, as he makes some clarifications)

Sandy