Пример #1
0
 private async Task SignInAsync(WishlistUser user, bool isPersistent)
 {
     AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
     AuthenticationManager.SignIn(new AuthenticationProperties()
     {
         IsPersistent = isPersistent
     }, await user.GenerateUserIdentityAsync(UserManager));
 }
Пример #2
0
        private async Task SignDonorIn(WishlistUser user, WishlistUserManager manager)
        {
            var authManager = HttpContext.GetOwinContext().Authentication;

            authManager.SignIn(new AuthenticationProperties {
                IsPersistent = true
            },
                               await user.GenerateUserIdentityAsync(manager));
        }