I have a simple couchapp for managing user tokens and secrets here: https://github.com/LearningRegistry/LearningRegistry/blob/master/couchdb/apps/kanso/oauth-key-management.json
Albeit it does use the BrowserID plugin for CouchDB. It is specific to our use case however feel free to fork and modify. There's also, in the same GH project some code the connects with Python via 2-legged OAuth. Also, I have a Chrome Extension that does all the OAuth client stuff in JS: https://github.com/jimklo/TheCollector - Jim Sent from my iPhone On Feb 16, 2013, at 4:58 AM, "Mike Harding" <[email protected]<mailto:[email protected]>> wrote: Hi All, I'm using CouchDB 1.2.1 and I want to leverage 2-legged OAuth. What I want to do is allow a external consumer application to create a _users document (account) and provide the developer of the consumer app with a consumer key and secret to protect requests. I just cant for the life of me get my head around how I create a _user document for the developer of the consumer application that includes the allocated consumer key and secret and then can use the _users authentication and authorization API to validate signed requests. there is a bit of description here http://wiki.apache.org/couchdb/Link_Collection_Authentication_and_Authorizationabout the structure of the _user document for an oauth user but I dont see any practicial examples (ideally in php) that show how I can use the integrated OAuth to authenticate consumer app requests. Any help would be much appreciated. Thanks M
