/// <summary>
 ///     Validate a user token
 /// </summary>
 /// <typeparam name="TUser"></typeparam>
 /// <typeparam name="TKey"></typeparam>
 /// <param name="manager"></param>
 /// <param name="userId"></param>
 /// <param name="purpose"></param>
 /// <param name="token"></param>
 /// <returns></returns>
 public static bool VerifyUserToken <TUser, TKey>(this UserManager <TUser, TKey> manager, TKey userId,
                                                  string purpose, string token)
     where TKey : IEquatable <TKey>
     where TUser : class, IUser <TKey>
 {
     if (manager == null)
     {
         throw new ArgumentNullException("manager");
     }
     return(AsyncHelper.RunSync(() => manager.VerifyUserTokenAsync(userId, purpose, token)));
 }