Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bitdrift/777406 to your computer and use it in GitHub Desktop.
Save bitdrift/777406 to your computer and use it in GitHub Desktop.
From 0ec0dde861bf0e3f6d35c971d79b62d970a114f1 Mon Sep 17 00:00:00 2001
From: Ryan Probasco <ryan@bitdrift.org>
Date: Wed, 12 Jan 2011 21:32:56 -0700
Subject: [PATCH] Expose default authenticate parameters for extended attribute requests
---
openid.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/openid.js b/openid.js
index b1db0cc..516d570 100644
--- a/openid.js
+++ b/openid.js
@@ -649,12 +649,19 @@ openid.authenticate = function(identifier, returnUrl, realm, immediate, callback
});
}
+// Default parameters for authenticate
+openid.authenticate.defaultParams = {};
+
function _requestAuthentication(provider, assoc_handle, returnUrl, realm, immediate, callback)
{
var params = {
'openid.mode' : immediate ? 'checkid_immediate' : 'checkid_setup'
};
+ // Copy defaults
+ for (var i in openid.authenticate.defaultParams)
+ params[i] = openid.authenticate.defaultParams[i];
+
if(provider.version.indexOf('2.0') !== -1)
{
params['openid.ns'] = 'http://specs.openid.net/auth/2.0';
--
1.7.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment