summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs')
-rw-r--r--src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs b/src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
index b5b6162..5900e7b 100644
--- a/src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
+++ b/src/DotNetOpenAuth.OpenId.RelyingParty.UI/OpenId/RelyingParty/OpenIdAjaxTextBox.cs
@@ -22,6 +22,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
using System.Drawing.Design;
using System.Globalization;
using System.Text;
+ using System.Threading;
+ using System.Threading.Tasks;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using DotNetOpenAuth.Messaging;
@@ -716,7 +718,8 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
loader.insert();
} } catch (e) { }";
- this.Page.ClientScript.RegisterClientScriptInclude("yuiloader", this.Page.Request.Url.IsTransportSecure() ? YuiLoaderHttps : YuiLoaderHttp);
+ this.Page.ClientScript.RegisterClientScriptInclude(
+ "yuiloader", this.Page.Request.Url.IsTransportSecure() ? YuiLoaderHttps : YuiLoaderHttp);
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "requiredYuiComponents", yuiLoadScript, true);
}
@@ -737,8 +740,9 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
// If an Identifier is preset on this control, preload discovery on that identifier,
// but only if we're not already persisting an authentication result since that would
// be redundant.
- if (this.Identifier != null && this.AuthenticationResponse == null) {
- this.PreloadDiscovery(this.Identifier);
+ var response = Task.Run(() => this.GetAuthenticationResponseAsync(CancellationToken.None)).GetAwaiter().GetResult();
+ if (this.Identifier != null && response == null) {
+ this.PreloadDiscoveryAsync(this.Identifier, CancellationToken.None).Wait();
}
}