You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2013/01/08 03:20:31 UTC
[Couchdb Wiki] Update of "Session_API" by JensAlfke
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 JensAlfke:
http://wiki.apache.org/couchdb/Session_API?action=diff&rev1=10&rev2=11
Comment:
Removed statement about using GET to create a session, as it's no longer true.
{{{
POST /_session
}}}
+ with "name" and "password" fields. These can be sent either as JSON or the standard form data encoding; just be sure to set the Content-Type appropriately. (The latter format allows you to log in directly from a simple HTML form.)
- with "name" and "password" fields or a
- {{{
- GET /_session
- }}}
- with (by default) a standard Basic Authorization header:
- {{{
- Authorization: Basic <base64-encoded-username:password>
- }}}
The username is the "name" field of a user's record in CouchDB's _users database.
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 or GET /_session command will return a JSON value:
+ In case of success, the POST /_session command will return a JSON value:
{{{
{
"ok": true,
@@ -120, +113 @@
=== Session Timeout ===
- The session timeout is specified by the "timeout" parameter in the "couch_httpd_auth" section of configuration.
+ The session timeout is specified by the "timeout" parameter in the "couch_httpd_auth" section of the configuration.
If not specified it defaults to 600 seconds (10 minutes).