ory / docs

The Ory documentation
https://www.ory.sh/docs
Apache License 2.0
136 stars 379 forks source link

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

Closed mvanderlee closed 2 months ago

mvanderlee commented 1 year ago

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

aeneasr commented 1 year ago

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

github-actions[bot] commented 3 months ago

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneously you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️