示例#1
0
 public virtual async Task <bool> VerifyUserTokenAsync(TUser user, string purpose, string token)
 {
     if (UserTokenProvider == null)
     {
         throw new NotSupportedException("No Token Provider");
     }
     if (user == null)
     {
         throw new ArgumentNullException("user");
     }
     // Make sure the token is valid
     return(await UserTokenProvider.ValidateAsync(purpose, token, this, user));
 }
 public bool ValidateConfirmEmailToken(User user, string token)
 {
     return(UserTokenProvider.ValidateAsync("EmailConfirmation", token, this, user).Result);
 }