diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 15:36:55 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2013-05-05 15:36:55 -0700 |
commit | 49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c (patch) | |
tree | 9b836b0b9e94b8aa1e650c68e714bc214439d8da /samples/TestAzureAD/App_Start | |
parent | 7edb0a63ef796af300c670ce90df8e7670930a10 (diff) | |
parent | 489bf70111fe4839e87fa591928d2845341f0059 (diff) | |
download | DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.zip DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.tar.gz DotNetOpenAuth-49d654965b6cf0ee6aa171dec50b1d0b8fb86e0c.tar.bz2 |
Adds Azure Active Directory OAuth 2 client.
Closes #271
Diffstat (limited to 'samples/TestAzureAD/App_Start')
-rw-r--r-- | samples/TestAzureAD/App_Start/AuthConfig.cs | 40 | ||||
-rw-r--r-- | samples/TestAzureAD/App_Start/BundleConfig.cs | 36 |
2 files changed, 76 insertions, 0 deletions
diff --git a/samples/TestAzureAD/App_Start/AuthConfig.cs b/samples/TestAzureAD/App_Start/AuthConfig.cs new file mode 100644 index 0000000..f8b3219 --- /dev/null +++ b/samples/TestAzureAD/App_Start/AuthConfig.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using Microsoft.AspNet.Membership.OpenAuth; + +namespace TestAzureAD +{ + internal static class AuthConfig + { + public static void RegisterOpenAuth() + { + // See http://go.microsoft.com/fwlink/?LinkId=252803 for details on setting up this ASP.NET + // application to support logging in via external services. + + //OpenAuth.AuthenticationClients.AddTwitter( + // consumerKey: "your Twitter consumer key", + // consumerSecret: "your Twitter consumer secret"); + + OpenAuth.AuthenticationClients.AddFacebook( + appId: "XX", + appSecret: "YY"); + + //OpenAuth.AuthenticationClients.AddMicrosoft( + // clientId: "your Microsoft account client id", + // clientSecret: "your Microsoft account client secret"); + + //OpenAuth.AuthenticationClients.AddGoogle(); + + OpenAuth.AuthenticationClients.Add("Azure Active Directory", () => new DotNetOpenAuth.AspNet.Clients.AzureADClient("64e0b14b-43ae-497c-b1a8-e8a841a341fd", "MySecretPassword")); + + + //AddFacebook( + //appId: "your Facebook app id", + //appSecret: "your Facebook app secret"); + + + } + } +}
\ No newline at end of file diff --git a/samples/TestAzureAD/App_Start/BundleConfig.cs b/samples/TestAzureAD/App_Start/BundleConfig.cs new file mode 100644 index 0000000..84be44e --- /dev/null +++ b/samples/TestAzureAD/App_Start/BundleConfig.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Optimization; + +namespace TestAzureAD +{ + public class BundleConfig + { + // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254726 + public static void RegisterBundles(BundleCollection bundles) + { + bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include( + "~/Scripts/WebForms/WebForms.js", + "~/Scripts/WebForms/WebUIValidation.js", + "~/Scripts/WebForms/MenuStandards.js", + "~/Scripts/WebForms/Focus.js", + "~/Scripts/WebForms/GridView.js", + "~/Scripts/WebForms/DetailsView.js", + "~/Scripts/WebForms/TreeView.js", + "~/Scripts/WebForms/WebParts.js")); + + bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include( + "~/Scripts/WebForms/MsAjax/MicrosoftAjax.js", + "~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js", + "~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js", + "~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js")); + + // Use the Development version of Modernizr to develop with and learn from. Then, when you’re + // ready for production, use the build tool at http://modernizr.com to pick only the tests you need + bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( + "~/Scripts/modernizr-*")); + } + } +}
\ No newline at end of file |