summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-05-19 17:34:31 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-05-19 20:21:42 -0700
commitffbb4906e0db3faf37fd41f0ce91da3c97bf9e3f (patch)
tree66dca56c4748093cca4219931cb73e0b89ba6f3b /src
parent0c8ada4341992a33147645be42359ba5ad5a1404 (diff)
downloadDotNetOpenAuth-ffbb4906e0db3faf37fd41f0ce91da3c97bf9e3f.zip
DotNetOpenAuth-ffbb4906e0db3faf37fd41f0ce91da3c97bf9e3f.tar.gz
DotNetOpenAuth-ffbb4906e0db3faf37fd41f0ce91da3c97bf9e3f.tar.bz2
We now only add UI extension to the OpenIdAjaxTextBox outgoing request when the OP advertises support for it.
Since we're only following the RP rules for the UI extension if the OP advertises support for it, it makes sense that we only declare ourselves as using it in the same circumstances.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdAjaxTextBox.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdAjaxTextBox.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
index 7779289..3da4e1b 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
@@ -1266,13 +1266,16 @@ if (!openidbox.dnoi_internal.onSubmit()) {{ return false; }}
// Configure each generated request.
int reqIndex = 0;
foreach (var req in requests) {
- // Inform the OP that we'll be using a popup window.
- req.AddExtension(new UIRequest());
-
req.AddCallbackArguments("index", (reqIndex++).ToString(CultureInfo.InvariantCulture));
if (req.Provider.IsExtensionSupported<UIRequest>()) {
+ // Inform the OP that we'll be using a popup window.
+ req.AddExtension(new UIRequest());
+
// Provide a hint for the client javascript about whether the OP supports the UI extension.
+ // This is so the window can be made the correct size for the extension.
+ // If the OP doesn't advertise support for the extension, the javascript will use
+ // a bigger popup window.
req.AddCallbackArguments("dotnetopenid.popupUISupported", "1");
}