fixup bearer auth

This commit is contained in:
honzapatCZ 2026-04-03 12:26:36 +02:00
parent b20dad7208
commit 45d7674f86

View File

@ -37,7 +37,8 @@ public partial class PermissionHandler : AuthorizationHandler<PermissionRequirem
} }
else else
{ {
var sub = context.User.FindFirst("sub")?.Value; Console.WriteLine(string.Join(',', context.User.Claims.Select(c => $"{c.Type}: {c.Value}")));
var sub = context.User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
if (sub == null) if (sub == null)
return; return;