Exemplo n.º 1
0
 private async Task SignInAsync(User user, bool isPersistent)
 {
     AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
     AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = isPersistent },
         await user.GenerateUserIdentityAsync(UserManager));
 }
Exemplo n.º 2
0
 public static async Task SignInAsync(IAuthenticationManager authManager, ApplicationUserManager userManager,
     User user, bool isPersistent)
 {
     authManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
     authManager.SignIn(new AuthenticationProperties {IsPersistent = isPersistent},
         await user.GenerateUserIdentityAsync(userManager));
 }