From c5e2ccfe99f4ca515390169f01c9ea83a4c07c00 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Tue, 2 Feb 2010 21:09:06 +0000 Subject: oops. forgot to add this file in latest commit git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@905800 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/test/proxyauth.js | 131 +++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 share/www/script/test/proxyauth.js (limited to 'share/www/script/test') diff --git a/share/www/script/test/proxyauth.js b/share/www/script/test/proxyauth.js new file mode 100644 index 00000000..171eef37 --- /dev/null +++ b/share/www/script/test/proxyauth.js @@ -0,0 +1,131 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + + + +couchTests.proxyauth = function(debug) { + // this test proxy authentification handler + + var usersDb = new CouchDB("test_suite_users", {"X-Couch-Full-Commit":"false"}); + var db = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"false"}); + + if (debug) debugger; + + // Simple secret key generator + function generateSecret(length) { + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var secret = ''; + for (var i=0; i