GitHub user janl opened a pull request:

    https://github.com/apache/couchdb/pull/366

    Allow server admins to retrieve an auth token for any other user

    First proposal is a new endpoint /_login_as/<username>, but could be any
    other endpoint, even included in /_session, this is just to demonstrate
    the feature.
    
    On success, the endpoint returns a JSON object that looks like this:
    
      {"auth_token": "amFuOjU2M0U0MDREOsGlD2HF6fday16PZGb0vIMDkWCw"}
    
    It returns 404 for nonexistent user or when in admin party mode.
    
    One use-case for this is building delegated authentication mechanisms
    in middleware on top of CouchDB (like Oauth), while still being able
    to log into CouchDB via it's native auth mechanisms without having
    to proxy all requests and their variations, for e.g. replication.
    
    This implementation is for 1.x.x for now (don't judge me), I'll
    also supply a 2.x version.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/janl/couchdb feature/delegated-session-req

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/366.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #366
    
----
commit c0cf51931919084547d111291ea152a4b97b1b35
Author: Jan Lehnardt <[email protected]>
Date:   2015-11-07T18:20:19Z

    Allow server admins to retrieve an auth token for any other user
    
    First proposal is a new endpoint /_login_as/<username>, but could be any
    other endpoint, even included in /_session, this is just to demonstrate
    the feature.
    
    On success, the endpoint returns a JSON object that looks like this:
    
      {"auth_token": "amFuOjU2M0U0MDREOsGlD2HF6fday16PZGb0vIMDkWCw"}
    
    It returns 404 for nonexistent user or when in admin party mode.
    
    One use-case for this is building delegated authentication mechanisms
    in middleware on top of CouchDB (like Oauth), while still being able
    to log into CouchDB via it's native auth mechanisms without having
    to proxy all requests and their variations, for e.g. replication.
    
    This implementation is for 1.x.x for now (don't judge me), I'll
    also supply a 2.x version.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to