Exemple #1
0
 public virtual async Task <string> GenerateUserTokenAsync(string purpose, TUser user)
 {
     if (UserTokenProvider == null)
     {
         throw new NotSupportedException("No Token Provider");
     }
     if (user == null)
     {
         throw new ArgumentNullException("user");
     }
     return(await UserTokenProvider.GenerateAsync(purpose, this, user));
 }
 public string GenerateConfirmEmailToken(User user)
 {
     return(UserTokenProvider.GenerateAsync("EmailConfirmation", this, user).Result);
 }