couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Session_API" by StephaneAlnet
Date Fri, 22 Apr 2011 11:41:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Session_API" page has been changed by StephaneAlnet.
The comment on this change is: Looked at actual traces rather than trying to guess from the
erlang source code :D.
http://wiki.apache.org/couchdb/Session_API?action=diff&rev1=5&rev2=6

--------------------------------------------------

  {{{
    POST /_session
  }}}
+ or a
+ {{{
+   GET /_session
+ }}}
  with (by default) a standard Basic Authorization header:
  {{{
     Authorization: Basic <base64-encoded-username:password>
@@ -19, +23 @@

  
  There is an optional "next" parameter that can be used to force a redirection after CouchDB
processed a successful login.
  
- In case of success, the POST /_session command will return a JSON value:
+ In case of success, the POST or GET /_session command will return a JSON value:
  {{{
    {
      "ok": true,
+     "userCtx": {
-     "name": "username",
+       "name": "username",
-     "roles": ["role1","role2"]
+       "roles": ["role1","role2"]
+     },
+     "info": {
+       "authentication_db":"_users",
+       "authentication_handlers":["oauth","cookie","default"],
+       "authenticated":"default"
+     }
    }
  }}}
+ 
- which is similar to the user context (userCtx) parameter of some of the Javascript functions.
+ Note how the userCtx field is similar to the user context (userCtx) parameter of some of
the Javascript functions.
  
  In case of error, the POST /_session command will return a JSON value:
  {{{

Mime
View raw message