Skip to content

Commit

Permalink
Adding option to check the required claim exist
Browse files Browse the repository at this point in the history
Signed-off-by: Javan lacerda <javanlacerda@google.com>
  • Loading branch information
javanlacerda committed Jun 20, 2024
1 parent c68bcee commit 2fcca6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/identity/ciprovider/principal.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ func applyTemplateOrReplace(path string, data map[string]string, defaultData map

if strings.Contains(path, "{{") {
var doc bytes.Buffer
t := template.New("")
// This option forces to having the claim that is required
// for the template
t := template.New("").Option("missingkey=error")
p, err := t.Parse(path)
if err != nil {
panic(err)
Expand Down

0 comments on commit 2fcca6c

Please sign in to comment.