diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-01-07 20:02:46 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-01-07 20:02:46 +0000 |
commit | cd0e9c9b6384e4c9200d10088a13164ce4229ea6 (patch) | |
tree | 0ac40098a49b2dd62b0099f742323a7811399489 /share/www/script/test/oauth.js | |
parent | dd15c8ed5bf5873aec08a99a0687849f1d29f4c3 (diff) |
merge account branch to trunk
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@896989 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/oauth.js')
-rw-r--r-- | share/www/script/test/oauth.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/share/www/script/test/oauth.js b/share/www/script/test/oauth.js index 5c6c0083..d55d13e8 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,12 @@ couchTests.oauth = function(debug) { usersDb.createDb(); // Create a user - T(CouchDB.createUser("jason", "testpassword", "test@somemail.com", ['test'], adminBasicAuthHeaderValue()).ok); + var jasonUserDoc = CouchDB.prepareUserDoc({ + username: "jason", + roles: ["test"] + }, "testpassword"); + T(usersDb.save(jasonUserDoc).ok); + var accessor = { consumerSecret: consumerSecret, @@ -227,7 +234,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", |