MCPcopy Index your code
hub / github.com/smallstep/cli / WithAudience

Function WithAudience

token/options.go:196–204  ·  view source on GitHub ↗

WithAudience returns a Options that sets the audience to use in the token claims. If Audience is not used the default audience will be used.

(s string)

Source from the content-addressed store, hash-verified

194// WithAudience returns a Options that sets the audience to use in the token
195// claims. If Audience is not used the default audience will be used.
196func WithAudience(s string) Options {
197 return func(c *Claims) error {
198 if s == "" {
199 return errors.New("audience cannot be empty")
200 }
201 c.Audience = append(jose.Audience{}, s)
202 return nil
203 }
204}
205
206// WithJWTID returns a Options that sets the jwtID to use in the token
207// claims. If WithJWTID is not used a random identifier will be used.

Callers 4

TokenMethod · 0.92
generateRenewTokenFunction · 0.92
RenewWithTokenMethod · 0.92
TestOptionsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestOptionsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…