コード例 #1
0
 private async Task SignInAsync(OSUser user, bool isPersistent)
 {
     AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
     AuthenticationManager.SignIn(new AuthenticationProperties()
     {
         IsPersistent = isPersistent, AllowRefresh = true, ExpiresUtc = DateTimeOffset.Now.AddDays(2)
     }, await user.GenerateUserIdentityAsync(UserManager));
 }
コード例 #2
0
 private async Task SignInAsync(OSUser user, bool isPersistent)
 {
     AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
     AuthenticationManager.SignIn(new AuthenticationProperties()
     {
         IsPersistent = isPersistent
     }, await user.GenerateUserIdentityAsync(UserManager));
 }