AddHeadersToRequest
with Claims[sub] and Claims[roles]
#1939
Replies: 3 comments 5 replies
-
I see now that JwtBearer settings in ASP .Net with the Jwt Schema change sub and roles to namespaces like this: {http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier: 8723c40a-0b57-4447-b1a5-d3c15f7ca9ea} so my sub I pass in is transformed to "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" To fix this I need to do: in the ClaimsParser if key is sub. |
Beta Was this translation helpful? Give feedback.
-
Or you use |
Beta Was this translation helpful? Give feedback.
-
if the claim name is |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Expected Behavior / New Feature
When pass this:
with this token:
Expect to have 3 header values.
Actual Behavior / Motivation for New Feature
This works no problem. If I type
typ
it also works. if I type other claims from token it all works.But when I use
sub
it says:Cannot find a claim for key: sub errors found in ResponderMiddleware.
If
roles
, the same:Cannot find a claim for key: roles errors found in ResponderMiddleware.
This they are all there in the token. And I can use most of the other claim names.
Is
sub
androles
somewhat reserved or ignored?Steps to Reproduce the Problem
Beta Was this translation helpful? Give feedback.
All reactions