Skip to content
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

Add documentation that the sprig template library is supported in templates. #1524

Open
3 of 5 tasks
mvanderlee opened this issue Sep 1, 2023 · 1 comment
Open
3 of 5 tasks
Labels
feat New feature or request.

Comments

@mvanderlee
Copy link

Preflight checklist

Ory Network Project

No response

Describe your problem

Please add documentation that the sprig template library is supported in the template syntax.
For a long time I've been manually trying to render a JSON string in the id_token claims field but was stumped on trying to handle nested fields. All I needed to do in the end was {{ toJson .Extra }}

After hours of trial and error I came across this file: https://github.com/ory/oathkeeper/blob/master/x/template.go which is how I discovered sprig. I only got to this particular file because I saw printIndex used in the documentation but didn't see it in the text/template's standard function documentation.
Perhaps sprig is a standard tool in the a Go developer's toolbox, but not being a Go developer myself I had no knowledge of this library.

My use-case is that I need to pass my custom hydrator's response into the JWT token.

Describe your ideal solution

It would be great if the use of sprig could be called out with some basic examples. For example, in the id_token documentation with toJson function usage.

Workarounds or alternatives

--

Version

0.40.6

Additional Context

No response

@mvanderlee mvanderlee added the feat New feature or request. label Sep 1, 2023
@vinckr vinckr transferred this issue from ory/oathkeeper Sep 4, 2023
@aeneasr
Copy link
Member

aeneasr commented Sep 4, 2023

Contributions highly appreciated! You know best where you're missing this info :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants