bmbruno / spark-server-lite

MIT License
0 stars 0 forks source link

Update BlogController to use .NET Core-style claims loader #29

Closed bmbruno closed 1 week ago

bmbruno commented 8 months ago

https://github.com/bmbruno/spark-server-lite/blob/88ea51bc4cbbf01f57bf23fca2ea74e21e60a88a/Application/SparkServerLite/Controllers/BlogController.cs#L106

Example:

string userID = HttpContext.User.FindFirstValue(ClaimTypes.NameIdentifier) ?? string.Empty;

bmbruno commented 1 week ago

Not necessary. Built-in ControllerBase User object is fine for this context.