DRAG DROP
You need to implement the security requirements for the solution.
You have the following code:
Which code segments should you include in Targe1, Target 2, Target 3 and Target 4 to modify RunLogController? To answer, drag the appropriate code segment to the correct targets. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.
Answer:
Explanation:
Target 1: [Authorize]
Target 2: [AllowAnonymous]
There are no security requirements for viewing runner data. Therefore, [AllowAnonyous] is required.
Target 3: [Authorize (Roles = “Admin”)]
Users must be members of the Admin role to edit or delete runner data.
Target 4: [Authorize (Roles = “Admin”)]
Users must be members of the Admin role to edit or delete runner data.
You have the following security requirements:
References: https://docs.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-2.1