Transform claim key not found to an empty string #1851
Replies: 2 comments
-
@guilhermebentomarques No! this breaks functionality. Why you are trying to put claim key after being authenticated? Its not a right idea. |
Beta Was this translation helpful? Give feedback.
-
Hello, Guilherme!
Why not to develop custom Delegating Handler module?
Ocelot doesn't support this syntax. We need to develop a feature. |
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.
-
Hi Ocelot team,
It's a question, not an issue.
Is it possible to check if a key exists and if not pass an empty string?
For example:
What I have:
"AddQueriesToRequest": { "userId": "Claims[sub] > value" }
Error Code: CannotFindClaimError Message:
Cannot find claim for key: sub errors found in ResponderMiddleware. Setting error response for request
What I would like to do (If the key doesn't exist, send an empty string.)
"AddQueriesToRequest": { "userId": "Claims[sub] ? Claims[sub] > value : '' " }
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions