Skip to content

Commit

Permalink
Fix dto mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Jul 10, 2024
1 parent 4deda4b commit d66463f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public async Task<ActionResult<UserInfoDto>> GetUserAsync(
Lastname = userInfo.Lastname,
Roles = userInfo.Roles,
LastFailedValidationTimestamp = userInfo.LastFailedValidationTimestamp,
LastSuccessfulValidationTimestamp = userInfo.LastSuccessfulValidationTimestamp
LastSuccessfulValidationTimestamp = userInfo.LastSuccessfulValidationTimestamp,
MfaActive = userInfo.MfaActive
};

return StatusCode(StatusCodes.Status200OK, item);
Expand Down Expand Up @@ -94,7 +95,8 @@ public async Task<ActionResult<UserInfoDto[]>> QueryUsersAsync(
Lastname = userInfo.Lastname,
Roles = userInfo.Roles,
LastFailedValidationTimestamp = userInfo.LastFailedValidationTimestamp,
LastSuccessfulValidationTimestamp = userInfo.LastSuccessfulValidationTimestamp
LastSuccessfulValidationTimestamp = userInfo.LastSuccessfulValidationTimestamp,
MfaActive = userInfo.MfaActive
});

return StatusCode(StatusCodes.Status200OK, items);
Expand Down
2 changes: 2 additions & 0 deletions src/Nager.Authentication.AspNet/Dtos/UserInfoDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ public class UserInfoDto
public DateTime? LastFailedValidationTimestamp { get; set; }

public DateTime? LastSuccessfulValidationTimestamp { get; set; }

public bool MfaActive { get; set; }
}
}

0 comments on commit d66463f

Please sign in to comment.