Forum Discussion
Nageswara5599
1 hour agoNew Member I
Lab not getting complete even it is correct
I am working on C# / ASP.NET API from the I am doing ASP.NET Core API: Username Enumeration lab, this lab task 1 is always showing incomplete even after I am generating correct results
[HttpPost("login")]
public ActionResult<LoginResponse> LoginUser(LoginRequest request)
{
var user = _repository.GetUserByEmail(request.Email);
var passwordValid = _hashingService.VerifyPassword( request.Password, user.Password );
if (user == null || !passwordValid) {
return Unauthorized(); }
return new LoginResponse { Jwt = _jwtService.GenerateJwt(user.Id, user.Email) };
}
Could you please help? I need to complete this today?
Regards
Nagesh
No RepliesBe the first to reply