You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5 KiB

10 years ago
  1. using Microsoft.AspNet.Identity;
  2. using Microsoft.Owin;
  3. using Microsoft.Owin.Security.Cookies;
  4. using Owin;
  5. namespace Sevomin.WebFrontend
  6. {
  7. public class Startup
  8. {
  9. public void Configuration(IAppBuilder app)
  10. {
  11. ConfigureAuth(app);
  12. }
  13. // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
  14. public void ConfigureAuth(IAppBuilder app)
  15. {
  16. // Enable the application to use a cookie to store information for the signed in user
  17. app.UseCookieAuthentication(new CookieAuthenticationOptions
  18. {
  19. AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
  20. LoginPath = new PathString("/Account/Login")
  21. });
  22. // Use a cookie to temporarily store information about a user logging in with a third party login provider
  23. app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
  24. // Uncomment the following lines to enable logging in with third party login providers
  25. //app.UseMicrosoftAccountAuthentication(
  26. // clientId: "",
  27. // clientSecret: "");
  28. //app.UseTwitterAuthentication(
  29. // consumerKey: "",
  30. // consumerSecret: "");
  31. //app.UseFacebookAuthentication(
  32. // appId: "",
  33. // appSecret: "");
  34. //app.UseGoogleAuthentication();
  35. }
  36. }
  37. }