]> gitweb.factorcode.org Git - factor.git/blob - basis/furnace/auth/providers/couchdb/couchdb-docs.factor
35d4ca7ec38a6b209b263a8b47616995a93fd474
[factor.git] / basis / furnace / auth / providers / couchdb / couchdb-docs.factor
1 USING: help.syntax help.markup help.vocabs furnace.auth.providers ;
2 IN: furnace.auth.providers.couchdb
3
4 HELP: couchdb-auth-provider
5 {
6     $class-description "Implements the furnace authentication protocol for CouchDB."
7     { $slots
8       { "base-url" { "The base URL for the CouchDB database, e.g. http://foo.org:5984/mydatabase" } }
9       { "username-view" { "A URL for a view which emits usernames as keys and user documents as values, "
10                                     "i.e. something like emit(doc.username, doc). The URL should be relative"
11                                     " to base-url (e.g. \"_design/my_views/_view/by_username\")."
12                                     " The view is not defined automatically by the library." } }
13       { "prefix" { "In order to ensure the uniqueness of user IDs and email addresses,"
14                              " the library creates documents in the database with ids corresponding to these values. "
15                              "These ids "
16                              "are prefixed by the string given as the value for this slot. Ideally, you should guarantee that no other "
17                              "documents in the database can have ids with this prefix. However, "
18                              "the worst that can happen is for someone to falsely be told that a username "
19                              "is taken when it is in fact free." } }
20       { "field-map" { "An assoc taking " { $link user } " slot names to CouchDB document "
21                                 "field names. It is not usually necessary to set this slot - it is useful only if "
22                                 "you do not wish to use the default field names." } }
23   }
24 } ;
25
26 ARTICLE: "furnace.auth.providers.couchdb" "CouchDB Authentication Provider"
27     "The " { $vocab-link "furnace.auth.providers.couchdb" } " vocabulary implements an authentication provider "
28     "which looks up authentication requests in CouchDB. It is necessary to create a view "
29     "associating usernames with user documents before using this vocabulary; see documentation "
30     "for " { $link couchdb-auth-provider } "."
31     $nl
32     "Although this implementation guarantees that users with duplicate IDs/emails"
33     " cannot be created in a single CouchDB database, it provides no such guarantee if you are clustering "
34     "multiple DBs. In this case, you are responsible for ensuring the uniqueness of users across "
35     "databases."
36     $nl
37     "Password hashes are base64 encoded."
38  ;
39
40 ABOUT: "furnace.auth.providers.couchdb"