diff options
-rw-r--r-- | src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs index 184707c..a920ac7 100644 --- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs +++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs @@ -1221,7 +1221,16 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { private bool IsPopupAppropriate() { Contract.Requires(this.Request != null); - return this.Popup == PopupBehavior.Always || this.Request.Provider.IsExtensionSupported<UIRequest>(); + switch (this.Popup) { + case PopupBehavior.Never: + return false; + case PopupBehavior.Always: + return true; + case PopupBehavior.IfProviderSupported: + return this.Request.Provider.IsExtensionSupported<UIRequest>(); + default: + throw new InternalErrorException(); + } } /// <summary> |