Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

With stateless mode, no need to calculate HMAC

  • Loading branch information...
commit d5a4ecf68b78b9c4c6a3750ce0dc0acaf7ddebc8 1 parent 3ea376f
@ozten ozten authored
View
5 docs/LOAD_TESTING.md
@@ -15,8 +15,9 @@ Usage
node server/tests/mock_proxy_idp.js
export CONFIG_FILES=server/config/local.json
- sudo HTTP_PROXY_PORT=8442 HTTPS_PROXY_PORT=8443 node server/bin/bigtent
- loady -c server/tests/load_gen.js -s https://dev.bigtent.mozilla.org
+ sudo HTTP_PROXY_HOST=localhost HTTPS_PROXY_HOST=localhost \
+ HTTP_PROXY_PORT=8442 HTTPS_PROXY_PORT=8442 node server/bin/bigtent
+ CONFIG_FILES=server/config/local.json loady -c server/tests/load_gen.js -s https://dev.bigtent.mozilla.org
Output
------
View
6 server/tests/lib/load_gen/provision_yahoo_y.js
@@ -132,11 +132,15 @@ function returnFromYahoo (user, cfg, cb) {
// TODO Fixing Issue #41 would make this actually work...
// Then we could do /sign_in and have a working session...
var msg = 'Failed to verify assertion (message: Invalid association handle)';
+ if (debug) console.log(err, body);
if (500 === r.statusCode &&
0 === body.indexOf(msg)) {
// Success, but weak sauce
cb(null);
+ } else if ('/id_mismatch?' === r.request.path) {
+ cleanup(user);
+ cb('Got id_mismatch page');
} else if (err) {
cleanup(user);
cb(err);
@@ -154,7 +158,7 @@ if (require.main === module) {
debug = true;
userdb.addNewUser(userdb.getNewUser());
- exports.startFunc({base: 'https://127.0.0.1'}, function (err) {
+ exports.startFunc({base: 'https://dev.bigtent.mozilla.org'}, function (err) {
if (err) {
console.log('Finished with ERROR');
console.error(err);
View
2  server/tests/lib/load_gen/refresh_certificate_c.js
@@ -38,7 +38,7 @@ exports.startFunc = function (cfg, cb) {
throw new Error('Unable to load bigtent certificate');
}
certifier(JSON.stringify(publicKey),
- 'alice@gmail.com',
+ 'alice@yahoo.com',
60 * 60 * 6,
function (err, body) {
userdb.releaseUser(user);
View
7 server/tests/lib/mock_proxy_ip/views/openid_op_auth.txt.ejs
@@ -1,7 +1,2 @@
ns:http://specs.openid.net/auth/2.0
-assoc_handle:_7xbjrv7_lG89lIGNXSW0yYCIJPhfbF.e3IzI55XXhN2Aoo.7XQDTHezV1jdMLlWU6U8AGAeKXCDjwFo.8uGGDEzjxEdS5YRxkE8l4yXgLBurPizeOzuSOWN9f0PeU.5zvt6
-session_type:DH-SHA256
-assoc_type:HMAC-SHA256
-expires_in:14400
-enc_mac_key:cAaMGAhNQkldzi8DizA4FBCyUats5sgZP37+oLuoBhc=
-dh_server_public:ALklU2Dcak/MarH1S7P7KUQHqg9f95HDOXQo94ZMUsaN4pFjvI8u2sOE9AFNNIgG3SDSUA4TVMT9d3r5RNLF3qcUPMdEdEshAP4a2+emsla5+vVt+yvUnQor6yk5c7dpVQr7Ttp1sXjsw4iYovQBvkMKG0WCLr55xfUIlAlwLIPD
+is_valid:true
View
13 server/tests/mock_proxy_idp.js
@@ -85,19 +85,15 @@ try {
/* Yahoo */
app.get('/openid20/www.yahoo.com/xrds', function (req, res) {
- //res.contentType('application/xrds+xml');
res.header('Content-Type', 'application/xrds+xml');
- console.log('Sending xrds');
res.render('openid20_www.yahoo.com_xrds.ejs');
});
- // Bug we don't calculate the signature dynamically
app.post('/openid/op/auth', function (req, res) {
res.render('openid_op_auth.txt.ejs');
});
app.get('/a/wS1JKacQi4p4xQo18GMr_WME7g--', function (req, res) {
- //res.contentType('text/html');
res.render('a_wS1JKacQi4p4xQo18GMr.html.ejs');
});
@@ -105,6 +101,10 @@ try {
res.render('openid20_user_profile_xrds.ejs');
});
+ app.get('/.well-known/host-meta', function(req, res) {
+ res.send('ok');
+ });
+
/* Hotmail */
app.post('/token', function (req, res) {
res.header('x-msnserver', 'SN1MSG2020239');
@@ -116,6 +116,11 @@ try {
res.header('Content-Type', 'application/json');
res.render('v5.ejs');
});
+
+ app.use(function (req, res, next) {
+ console.log('UNKNOWN request=', req);
+ next();
+ });
});
http_app.listen(8442);
Please sign in to comment.
Something went wrong with that request. Please try again.