diff options
Diffstat (limited to 'samples/TestAzureAD/Account/OpenAuthProviders.ascx.cs')
-rw-r--r-- | samples/TestAzureAD/Account/OpenAuthProviders.ascx.cs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/samples/TestAzureAD/Account/OpenAuthProviders.ascx.cs b/samples/TestAzureAD/Account/OpenAuthProviders.ascx.cs deleted file mode 100644 index 2058c27..0000000 --- a/samples/TestAzureAD/Account/OpenAuthProviders.ascx.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using Microsoft.AspNet.Membership.OpenAuth; - -namespace TestAzureAD.Account -{ - public partial class OpenAuthProviders : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) - { - - if (IsPostBack) - { - var provider = Request.Form["provider"]; - if (provider == null) - { - return; - } - - var redirectUrl = "~/Account/RegisterExternalLogin.aspx"; - if (!String.IsNullOrEmpty(ReturnUrl)) - { - var resolvedReturnUrl = ResolveUrl(ReturnUrl); - redirectUrl += "?ReturnUrl=" + HttpUtility.UrlEncode(resolvedReturnUrl); - } - - OpenAuth.RequestAuthentication(provider, redirectUrl); - } - } - - - - public string ReturnUrl { get; set; } - - - public IEnumerable<ProviderDetails> GetProviderNames() - { - return OpenAuth.AuthenticationClients.GetAll(); - } - - } -}
\ No newline at end of file |