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
|
public class AuthController : ControllerBase
|
||||||
{
|
{
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpGet("me")]
|
[HttpGet(nameof(Me))]
|
||||||
public IActionResult GetMe()
|
public IActionResult Me()
|
||||||
{
|
{
|
||||||
var identity = User.Identity;
|
var identity = User.Identity;
|
||||||
return Ok(new
|
return Ok(new
|
||||||
|
|||||||
Reference in New Issue
Block a user