1 USING: help.syntax help.markup help.vocabs furnace.auth.providers ;
2 IN: furnace.auth.providers.couchdb
4 HELP: couchdb-auth-provider
6 $class-description "Implements the furnace authentication protocol for CouchDB."
8 { { $slot "base-url" } { "The base URL for the CouchDB database, e.g. http://foo.org:5984/mydatabase" } }
9 { { $slot "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 { { $slot "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. "
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 { { $slot "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." } }
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 } "."
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 "
37 "Password hashes are base64 encoded."
40 ABOUT: "furnace.auth.providers.couchdb"