Created
February 26, 2014 07:07
-
-
Save ShawInnes/9225022 to your computer and use it in GitHub Desktop.
OWIN Authentication Startup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Microsoft.Owin; | |
using Owin; | |
using Owin.Security.Providers.GitHub; | |
using Owin.Security.Providers.LinkedIn; | |
using Owin.Security.Providers.Yahoo; | |
using Owin.Security.Providers.Reddit; | |
using Microsoft.Owin.Security.WsFederation; | |
using Microsoft.Owin.Security.Cookies; | |
[assembly: OwinStartup(typeof(WebSite.Startup))] | |
namespace WebSite | |
{ | |
public class Startup | |
{ | |
public void Configuration(IAppBuilder app) | |
{ | |
app.UseGitHubAuthentication("", ""); | |
app.UseLinkedInAuthentication("", ""); | |
app.UseYahooAuthentication("", ""); | |
app.UseRedditAuthentication("", ""); | |
app.UseGoogleAuthentication(); | |
app.UseMicrosoftAccountAuthentication("", ""); | |
app.UseTwitterAuthentication("", ""); | |
app.UseCookieAuthentication( | |
new CookieAuthenticationOptions | |
{ | |
AuthenticationType = | |
WsFederationAuthenticationDefaults.AuthenticationType | |
}); | |
app.UseWsFederationAuthentication(new WsFederationAuthenticationOptions | |
{ | |
MetadataAddress = "https://login.windows.net/azurefridays.onmicrosoft.com/federationmetadata/2007-06/federationmetadata.xml", | |
Wtrealm = "http://myapps/WsFed_AAD1", | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment