Skip to content

Commit

Permalink
Refactor oidc to take advantage of omitempty
Browse files Browse the repository at this point in the history
  • Loading branch information
triarius committed Nov 13, 2022
1 parent 3ec96cc commit 1a9d87e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions clicommand/odic_request_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ var OidcRequestTokenCommand = cli.Command{
roko.WithStrategy(roko.Exponential(backoffSeconds*time.Second, 0)),
).Do(func(r *roko.Retrier) error {
req := &api.OidcTokenRequest{
JobId: cfg.Job,
}
if len(cfg.Audience) > 0 {
req.Audience = cfg.Audience
JobId: cfg.Job,
Audience: cfg.Audience,
}

token, resp, err = client.OidcToken(req)
Expand Down

0 comments on commit 1a9d87e

Please sign in to comment.