C
C#

help

❔ How can the guid claim out of the http context

TTotechsStrypper2/17/2023
Here is my token information and I use this code to get the guid but nothing return
var guid = HttpContext.User.FindFirst("guid")?.Value;
var guid = HttpContext.User.FindFirst("guid")?.Value;
Ccumslvt132/17/2023
Probably HttpContext.User.ClaimsPrincipal.Claims
TTotechsStrypper2/17/2023
No I got it I didn't include this [Authorize(AuthenticationSchemes = "Bearer")] On the head of my controller
AAccord2/18/2023
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.

Looking for more? Join the community!