You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm creating a claim with name sub and value xxx
However when a request is made using a token, the only claim I can find is name http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier and value xxx
(From System.Security.Claims.ClaimsPrincipal.Claims ControllerBase.User.Claims in my ASP controller)
The value is still the same but the claim name is not sub, though it is when I check the signed token.
Why is that ? How can I access the Sub claim without hardcoding this "url" claim name which seems unreliable?
Using Microsoft.AspNetCore.Authentication.JwtBearer 7.0.9
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm signing a token this way
So I'm creating a claim with name
sub
and valuexxx
However when a request is made using a token, the only claim I can find is name
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier
and valuexxx
(From
System.Security.Claims.ClaimsPrincipal.Claims ControllerBase.User.Claims
in my ASP controller)The value is still the same but the claim name is not
sub
, though it is when I check the signed token.Why is that ? How can I access the Sub claim without hardcoding this "url" claim name which seems unreliable?
Using Microsoft.AspNetCore.Authentication.JwtBearer 7.0.9
Beta Was this translation helpful? Give feedback.
All reactions