Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1356

POST _session responds with name: null if _admin user and no _users doc present

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1.1, 2.0.0, 1.6.1
    • 2.0.0
    • None
    • None

    Description

      When logging in with admin credentials (and no corresponding _users doc, if that is important), the response of the POST to _session has the name property set to null:

      {"ok":true,"name":null,"roles":["_admin"]}

      It should be the name of the admin instead, like it does when logging in with a standard user:

      {"ok":true,"name":"standarduser","roles":[]}

      Requesting the _session object after logging in with an admin, the name is proper set:

      {"ok":true,"userCtx":

      {"name":"adminuser","roles":["_admin"]}

      ,"info":{"authentication_db":"_users","authentication_handlers":["oauth","cookie","default"],"authenticated":"cookie"}}

      Johannes

      Attachments

        Activity

          People

            robertkowalski Robert Kowalski
            jjs Johannes J. Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment