Add documentation that the sprig template library is supported in templates. #1524
Open
3 of 5 tasks
Labels
feat
New feature or request.
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
The text was updated successfully, but these errors were encountered: