-
Hi there, I have a question if there is a possibility to get "RouteClaimsRequirement": {
"userType" : "{userId}"
} but |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
All functionality for claims is in our docs: Read docs carefully please!
According to Authorization doc,
Well... You can read any header mostly in all Ocelot classes where you have To read the header you can develop Delegating Handler, but further applications of the header value depend of your goal. Possibly it is not your case... "RouteClaimsRequirement": {
"userType" : "{userId}"
} Unfortunately, RouteClaimsRequirement feature doesn't support any placeholders, there are no such logic! But... you can read Hope it helps! |
Beta Was this translation helpful? Give feedback.
All functionality for claims is in our docs:
Read docs carefully please!
According to Authorization doc,
userType
claim must exist in JWT auth token.Also,
userId
claim should also exist in auth token claims list.Well... You can read any header mostly in all Ocelot classes where you have
HttpContext
orHttpRequestMessage
objects.Also some useful info about headers can be read from
DownstreamRoute
object like this:httpContext.Items().DownstreamRoute()
. But better to read headers fromHttpContext
for sure.To read the header you can develop Delegating Handler, but further applica…