Feature/Auth: implement user authentication #3

Merged
homeburger merged 48 commits from feature/auth into main 2026-03-22 20:52:22 -05:00
Showing only changes of commit 10ac1a6076 - Show all commits

View File

@@ -15,13 +15,13 @@ public class ItemsController : ControllerBase {
service_ = service; service_ = service;
} }
[AllowAnonymous] // accessible if not authorized [[Authorize]]
[HttpGet] [HttpGet]
public async Task<ActionResult<List<Item>>> getItems() { public async Task<ActionResult<List<Item>>> getItems() {
return Ok(await service_.GetAll()); return Ok(await service_.GetAll());
} }
[AllowAnonymous] [[Authorize]]
[HttpGet("{id:int}")] [HttpGet("{id:int}")]
public async Task<ActionResult<Item>> getItem(int id) { public async Task<ActionResult<Item>> getItem(int id) {