summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js10
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/SelectorProviderButton.cs14
2 files changed, 20 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js
index 41aaea6..2041618 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdSelector.js
@@ -103,9 +103,13 @@ $(function() {
li.authenticationIFrames = new window.dnoa_internal.FrameManager(1/*throttle*/);
var openid = new window.OpenIdIdentifier(li.id);
var authFrames = li.authenticationIFrames;
- li.loginBackground = function() {
- openid.loginBackground(authFrames, null, null, backgroundTimeout);
- };
+ if ($(li).hasClass('NoAsyncAuth')) {
+ li.loginBackground = function() { };
+ } else {
+ li.loginBackground = function() {
+ openid.loginBackground(authFrames, null, null, backgroundTimeout);
+ };
+ }
li.loginBackground();
}
});
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/SelectorProviderButton.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/SelectorProviderButton.cs
index c9becd7..6818d57 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/SelectorProviderButton.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/SelectorProviderButton.cs
@@ -40,6 +40,13 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
public Identifier OPIdentifier { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this Provider doesn't handle
+ /// checkid_immediate messages correctly and background authentication
+ /// should not be attempted.
+ /// </summary>
+ public bool SkipBackgroundAuthentication { get; set; }
+
+ /// <summary>
/// Ensures that this button has been initialized to a valid state.
/// </summary>
internal override void EnsureValid() {
@@ -59,7 +66,12 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
/// <param name="writer">The writer.</param>
protected internal override void RenderLeadingAttributes(HtmlTextWriter writer) {
writer.AddAttribute(HtmlTextWriterAttribute.Id, this.OPIdentifier);
- writer.AddAttribute(HtmlTextWriterAttribute.Class, "OPButton");
+
+ string style = "OPButton";
+ if (this.SkipBackgroundAuthentication) {
+ style += " NoAsyncAuth";
+ }
+ writer.AddAttribute(HtmlTextWriterAttribute.Class, style);
}
/// <summary>