summaryrefslogtreecommitdiff
path: root/share/www/script/test/oauth.js
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-01-05 18:11:58 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-01-05 18:11:58 +0000
commit3a1f041e07c75001cf52cbae1391dcd801c17396 (patch)
tree749cf6441f847bea450f007b46b01a506beb4a58 /share/www/script/test/oauth.js
parent47d4f324ec2fe0e4ab907b8a023bc689c8192fb1 (diff)
merge account branch to apache branch
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/account@896158 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/oauth.js')
-rw-r--r--share/www/script/test/oauth.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/share/www/script/test/oauth.js b/share/www/script/test/oauth.js
index 5c6c0083..89e0aaf8 100644
--- a/share/www/script/test/oauth.js
+++ b/share/www/script/test/oauth.js
@@ -97,6 +97,8 @@ couchTests.oauth = function(debug) {
CouchDB.request("GET", "/_sleep?time=50");
+ CouchDB.newUuids(2); // so we have one to make the salt
+
CouchDB.request("PUT", "http://" + host + "/_config/couch_httpd_auth/require_valid_user", {
headers: {
"X-Couch-Persist": "false",
@@ -113,7 +115,14 @@ couchTests.oauth = function(debug) {
usersDb.createDb();
// Create a user
- T(CouchDB.createUser("jason", "testpassword", "test@somemail.com", ['test'], adminBasicAuthHeaderValue()).ok);
+ // T(CouchDB.createUser("jason", "testpassword", "test@somemail.com", ['test'], adminBasicAuthHeaderValue()).ok);
+ // Create a user
+ var jasonUserDoc = CouchDB.prepareUserDoc({
+ username: "jason",
+ roles: ["test"]
+ }, "testpassword");
+ T(usersDb.save(jasonUserDoc).ok);
+
var accessor = {
consumerSecret: consumerSecret,
@@ -227,7 +236,7 @@ couchTests.oauth = function(debug) {
run_on_modified_server(
[
{section: "httpd",
- key: "WWW-Authenticate", value: 'Basic realm="administrator",OAuth'},
+ key: "WWW-Authenticate", value: 'OAuth'},
{section: "couch_httpd_auth",
key: "secret", value: generateSecret(64)},
{section: "couch_httpd_auth",