public Task<ValidationResult> ValidateTokenRequestAsync(ValidatedTokenRequest request, Core.Services.IUserService profile)
 {
     return Task.FromResult(new ValidationResult
     {
         IsError = false
     });
 }
        async public Task<CustomGrantValidationResult> ValidateAsync(string userName, string password, ValidatedTokenRequest request)
        {
            var user = await _userManager.FindByNameAsync(userName);
            if (user != null && await _userManager.CheckPasswordAsync(user, password))
            {
                return new CustomGrantValidationResult(user.Id, "password");
            }

            return new CustomGrantValidationResult("Invalid username or password");
        }
 public TokenRequestValidationResult(ValidatedTokenRequest validatedRequest)
 {
     IsError = false;
     ValidatedRequest = validatedRequest;
 }
 public Task<ClaimsPrincipal> ValidateAsync(ValidatedTokenRequest request)
 {
     return Task.FromResult<ClaimsPrincipal>(null);
 }