MCPcopy
hub / github.com/smallstep/cli / WithSubject

Function WithSubject

token/options.go:184–192  ·  view source on GitHub ↗

WithSubject returns an Options that sets the subject to use in the token claims.

(s string)

Source from the content-addressed store, hash-verified

182// WithSubject returns an Options that sets the subject to use in the token
183// claims.
184func WithSubject(s string) Options {
185 return func(c *Claims) error {
186 if s == "" {
187 return errors.New("subject cannot be empty")
188 }
189 c.Subject = s
190 return nil
191 }
192}
193
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.

Callers 5

generateRenewTokenFunction · 0.92
RenewWithTokenMethod · 0.92
NewFunction · 0.92
TestNewClaimsFunction · 0.85
TestOptionsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestNewClaimsFunction · 0.68
TestOptionsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…