Refactor AuthController 'me' endpoint and remove auth
- Changed [HttpGet("me")] to [HttpGet(nameof(Me))] for route safety.
- Renamed method from GetMe to Me for consistency.
- Removed [Authorize] attribute to allow unauthenticated access.
This commit is contained in:
@@ -11,8 +11,8 @@ namespace FakeNTLMServer.Controllers;
|
||||
public class AuthController : ControllerBase
|
||||
{
|
||||
[Authorize]
|
||||
[HttpGet("me")]
|
||||
public IActionResult GetMe()
|
||||
[HttpGet(nameof(Me))]
|
||||
public IActionResult Me()
|
||||
{
|
||||
var identity = User.Identity;
|
||||
return Ok(new
|
||||
|
||||
Reference in New Issue
Block a user