From cd0e9c9b6384e4c9200d10088a13164ce4229ea6 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Thu, 7 Jan 2010 20:02:46 +0000 Subject: merge account branch to trunk git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@896989 13f79535-47bb-0310-9956-ffa450edef68 --- etc/couchdb/default.ini.tpl.in | 5 +- etc/couchdb/local.ini | 6 +- share/Makefile.am | 5 + share/www/_sidebar.html | 28 ++- share/www/config.html | 4 +- share/www/couch_tests.html | 8 +- share/www/custom_test.html | 4 +- share/www/database.html | 3 +- share/www/dialog/_admin_party.html | 33 +++ share/www/dialog/_create_admin.html | 50 ++++ share/www/dialog/_login.html | 34 +++ share/www/dialog/_signup.html | 35 +++ share/www/document.html | 9 +- share/www/index.html | 1 + share/www/replicator.html | 2 + share/www/script/couch.js | 62 ++--- share/www/script/couch_test_runner.js | 67 +++++- share/www/script/couch_tests.js | 1 + share/www/script/futon.browse.js | 7 +- share/www/script/futon.js | 128 ++++++++++ share/www/script/jquery.couch.js | 67 +++++- share/www/script/test/cookie_auth.js | 253 +++++++++++++------- share/www/script/test/oauth.js | 11 +- share/www/script/test/users_db.js | 67 ++++++ share/www/style/layout.css | 11 +- src/couchdb/couch_db.hrl | 7 +- src/couchdb/couch_httpd.erl | 28 ++- src/couchdb/couch_httpd_auth.erl | 439 ++++++++++++++-------------------- src/couchdb/couch_httpd_db.erl | 35 ++- src/couchdb/couch_httpd_oauth.erl | 3 +- 30 files changed, 962 insertions(+), 451 deletions(-) create mode 100644 share/www/dialog/_admin_party.html create mode 100644 share/www/dialog/_create_admin.html create mode 100644 share/www/dialog/_login.html create mode 100644 share/www/dialog/_signup.html create mode 100644 share/www/script/test/users_db.js diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in index 71656d26..409bfe98 100644 --- a/etc/couchdb/default.ini.tpl.in +++ b/etc/couchdb/default.ini.tpl.in @@ -17,9 +17,8 @@ batch_save_interval = 1000 ; milliseconds after which to save batches [httpd] port = 5984 bind_address = 127.0.0.1 -authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, default_authentication_handler} +authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler} default_handler = {couch_httpd_db, handle_request} -WWW-Authenticate = Basic realm="administrator" [log] file = %localstatelogdir%/couch.log @@ -27,7 +26,6 @@ level = info [couch_httpd_auth] authentication_db = users -secret = replace this with a real secret in your local.ini file require_valid_user = false [query_servers] @@ -70,7 +68,6 @@ _log = {couch_httpd_misc_handlers, handle_log_req} _sleep = {couch_httpd_misc_handlers, handle_sleep_req} _session = {couch_httpd_auth, handle_session_req} _oauth = {couch_httpd_oauth, handle_oauth_req} -_user = {couch_httpd_auth, handle_user_req} [httpd_db_handlers] _view_cleanup = {couch_httpd_db, handle_view_cleanup_req} diff --git a/etc/couchdb/local.ini b/etc/couchdb/local.ini index 0a118770..96fcdc76 100644 --- a/etc/couchdb/local.ini +++ b/etc/couchdb/local.ini @@ -10,14 +10,12 @@ [httpd] ;port = 5984 ;bind_address = 127.0.0.1 +; Uncomment next line to trigger basic-auth popup on unauthorized requests. +;WWW-Authenticate = Basic realm="administrator" [log] ;level = debug -[couch_httpd_auth] -;secret = replace this with a real secret - - [update_notification] ;unique notifier name=/full/path/to/exe -with "cmd line arg" diff --git a/share/Makefile.am b/share/Makefile.am index 694b89b7..dafbc786 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -39,8 +39,13 @@ nobase_dist_localdata_DATA = \ www/couch_tests.html \ www/custom_test.html \ www/database.html \ + www/dialog/_admin_party.html \ www/dialog/_compact_database.html \ + www/dialog/_compact_view.html \ www/dialog/_view_cleanup.html \ + www/dialog/_create_admin.html \ + www/dialog/_login.html \ + www/dialog/_signup.html \ www/dialog/_create_database.html \ www/dialog/_delete_database.html \ www/dialog/_delete_document.html \ diff --git a/share/www/_sidebar.html b/share/www/_sidebar.html index c83b100c..6c7abc99 100644 --- a/share/www/_sidebar.html +++ b/share/www/_sidebar.html @@ -30,7 +30,31 @@ specific language governing permissions and limitations under the License. diff --git a/share/www/config.html b/share/www/config.html index f324c923..8f788041 100644 --- a/share/www/config.html +++ b/share/www/config.html @@ -19,10 +19,12 @@ specific language governing permissions and limitations under the License. + - + + + - + + + + + - + + - + - - - + - + + + + diff --git a/share/www/replicator.html b/share/www/replicator.html index 3516128d..5a09ca16 100644 --- a/share/www/replicator.html +++ b/share/www/replicator.html @@ -19,8 +19,10 @@ specific language governing permissions and limitations under the License. + +