From f7969c875b8c9f6ba22977ccb373e87f41df0ddf Mon Sep 17 00:00:00 2001 From: XShine555 Date: Fri, 29 May 2026 22:37:51 +0200 Subject: [PATCH] ?? --- WebApi/Authentication/CurrentUser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebApi/Authentication/CurrentUser.cs b/WebApi/Authentication/CurrentUser.cs index 1f198da..f2921b6 100644 --- a/WebApi/Authentication/CurrentUser.cs +++ b/WebApi/Authentication/CurrentUser.cs @@ -32,7 +32,7 @@ public sealed class CurrentUser : IBindableFromHttpContext public string? LastName { get; } - public Guid RequiredId => Id.HasValue? Id.Value : throw new InvalidOperationException("User ID is required but not present."); + public Guid RequiredId => Id ?? throw new InvalidOperationException("User Id claim is missing or invalid."); public bool HasClaim(string type) => Principal.HasClaim(c => c.Type == type);