summaryrefslogtreecommitdiffstats
path: root/src/server/Api/Internal/BaseInternalRoute.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Api/Internal/BaseInternalRoute.cs')
-rw-r--r--src/server/Api/Internal/BaseInternalRoute.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/Api/Internal/BaseInternalRoute.cs b/src/server/Api/Internal/BaseInternalRoute.cs
index 2f92c8e..6c0a2d9 100644
--- a/src/server/Api/Internal/BaseInternalRoute.cs
+++ b/src/server/Api/Internal/BaseInternalRoute.cs
@@ -5,11 +5,12 @@ namespace IOL.BookmarkThing.Server.Api.Internal;
[ApiController]
public class BaseInternalRoute : ControllerBase
{
+
/// <summary>
/// User data for the currently logged on user.
/// </summary>
protected LoggedInInternalUser LoggedInUser => new() {
+ Id = User.FindFirstValue(ClaimTypes.NameIdentifier).ToGuid(),
Username = User.Identity?.Name,
- Id = User.Claims.SingleOrDefault(c => c.Type == ClaimTypes.NameIdentifier)?.Value.ToGuid() ?? default
};
}