-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend replaceVariables functionality to work with objects in claims #674
Comments
@wallacekelly-da are the parameters |
Hi, @tommytroen! Thanks for asking:
|
@wallacekelly-da: Great thanks, this looks feasible. Will have a look soon. |
seems like this to are related? #683 |
@wallacekelly-da sorry for taking so long, we have create a PR here, #699 , which should support your use case. |
Fixed in #699 |
I have been using this today and it works great! Thanks, @tommytroen ! |
Repro steps
Motivated by this, define a request mapping in the JSON config file:
Desired Behavior
The mock-oauth2-server responds to token requests with a signed token with
${participantId}
,${actAs}
, and${readAs}
replaced with values from the token request. Here is a sample of what I'm looking for:Current Behavior
The fields
${participantId}
,${actAs}
, and${readAs}
are not replaced. Here is an example of what is returned:Related code
It looks like the
replaceVariables
function is only being applied to the first-level strings and lists of strings.From OAuth2TokenCallback.kt:
This code would need to be updated to recurse the fields of child objects. Or, perhaps more simply, perform the substitution on the full claims JSON string, instead of the individual claims.
The text was updated successfully, but these errors were encountered: