{"action":"created","issue":{"url":"https://api.github.com/repos/apache/couchdb/issues/366","labels_url":"https://api.github.com/repos/apache/couchdb/issues/366/labels{/name}","comments_url":"https://api.github.com/repos/apache/couchdb/issues/366/comments","events_url":"https://api.github.com/repos/apache/couchdb/issues/366/events","html_url":"https://github.com/apache/couchdb/pull/366","id":115701414,"number":366,"title":"Allow server admins to retrieve an auth token for any other user","user":{"login":"janl","id":11321,"avatar_url":"https://avatars.githubusercontent.com/u/11321?v=3","gravatar_id":"","url":"https://api.github.com/users/janl","html_url":"https://github.com/janl","followers_url":"https://api.github.com/users/janl/followers","following_url":"https://api.github.com/users/janl/following{/other_user}","gists_url":"https://api.github.com/users/janl/gists{/gist_id}","starred_url":"https://api.github.com/users/janl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janl/subscriptions","organizations_url":"https://api.github.com/users/janl/orgs","repos_url":"https://api.github.com/users/janl/repos","events_url":"https://api.github.com/users/janl/events{/privacy}","received_events_url":"https://api.github.com/users/janl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":36,"created_at":"2015-11-08T00:14:17Z","updated_at":"2015-11-25T23:56:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/couchdb/pulls/366","html_url":"https://github.com/apache/couchdb/pull/366","diff_url":"https://github.com/apache/couchdb/pull/366.diff","patch_url":"https://github.com/apache/couchdb/pull/366.patch"},"body":"First proposal is a new endpoint /_login_as/<username>, but could be any\r\nother endpoint, even included in /_session, this is just to demonstrate\r\nthe feature.\r\n\r\nOn success, the endpoint returns a JSON object that looks like this:\r\n\r\n  {\"auth_token\": \"amFuOjU2M0U0MDREOsGlD2HF6fday16PZGb0vIMDkWCw\"}\r\n\r\nIt returns 404 for nonexistent user or when in admin party mode.\r\n\r\nOne use-case for this is building delegated authentication mechanisms\r\nin middleware on top of CouchDB (like Oauth), while still being able\r\nto log into CouchDB via it's native auth mechanisms without having\r\nto proxy all requests and their variations, for e.g. replication.\r\n\r\nThis implementation is for 1.x.x for now (don't judge me), I'll\r\nalso supply a 2.x version."},"comment":{"url":"https://api.github.com/repos/apache/couchdb/issues/comments/159760866","html_url":"https://github.com/apache/couchdb/pull/366#issuecomment-159760866","issue_url":"https://api.github.com/repos/apache/couchdb/issues/366","id":159760866,"user":{"login":"KlausTrainer","id":230061,"avatar_url":"https://avatars.githubusercontent.com/u/230061?v=3","gravatar_id":"","url":"https://api.github.com/users/KlausTrainer","html_url":"https://github.com/KlausTrainer","followers_url":"https://api.github.com/users/KlausTrainer/followers","following_url":"https://api.github.com/users/KlausTrainer/following{/other_user}","gists_url":"https://api.github.com/users/KlausTrainer/gists{/gist_id}","starred_url":"https://api.github.com/users/KlausTrainer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KlausTrainer/subscriptions","organizations_url":"https://api.github.com/users/KlausTrainer/orgs","repos_url":"https://api.github.com/users/KlausTrainer/repos","events_url":"https://api.github.com/users/KlausTrainer/events{/privacy}","received_events_url":"https://api.github.com/users/KlausTrainer/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T23:56:44Z","updated_at":"2015-11-25T23:56:44Z","body":"+1 to all of this :)"}}