Guest User

Untitled

a guest
Jan 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. public void ConfigureAuth(IAppBuilder app)
  2. {
  3. app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
  4.  
  5. app.UseCookieAuthentication(
  6. new CookieAuthenticationOptions { }
  7. );
  8.  
  9. app.MapWhen(ctx => ctx.Request.Headers.Get("Host").Equals("abc.net"), app2 =>
  10. {
  11.  
  12. app.UseOpenIdConnectAuthentication(
  13. new OpenIdConnectAuthenticationOptions
  14. {
  15.  
  16. ClientId = authClientID1,
  17. Authority = authorityUrlAuth,
  18. RedirectUri = redirectURL,
  19.  
  20. });
  21. });
  22.  
  23. app.MapWhen(ctx => ctx.Request.Headers.Get("Host").Equals("def.net"), app3 =>
  24. {
  25.  
  26. app.UseOpenIdConnectAuthentication(
  27. new OpenIdConnectAuthenticationOptions
  28. {
  29.  
  30. ClientId = authClientID2,
  31. Authority = authorityUrlAuth,
  32. RedirectUri = redirectURL,
  33.  
  34.  
  35. });
  36. });
  37.  
  38. }
Add Comment
Please, Sign In to add comment