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.

26 lines
1002 B

4 years ago
  1. //using JMEAgentSystem.Models;
  2. using Microsoft.AspNet.Identity;
  3. using Microsoft.Owin;
  4. using Microsoft.Owin.Security.Cookies;
  5. using Owin;
  6. using System;
  7. namespace JMEAgentSystem
  8. {
  9. public partial class Startup
  10. {
  11. // For more information on configuring authentication, please visit https://go.microsoft.com/fwlink/?LinkId=301883
  12. public void ConfigureAuth(IAppBuilder app)
  13. {
  14. app.UseCookieAuthentication(new CookieAuthenticationOptions
  15. {
  16. AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
  17. LoginPath = new PathString("/Account/Login"),
  18. });
  19. app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
  20. app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5));
  21. app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);
  22. }
  23. }
  24. }