MCPcopy Create free account
hub / github.com/smallstep/cli / WithKid

Function WithKid

token/options.go:220–228  ·  view source on GitHub ↗

WithKid returns a Options that sets the header kid claims. If WithKid is not used a thumbprint using SHA256 will be used.

(s string)

Source from the content-addressed store, hash-verified

218// WithKid returns a Options that sets the header kid claims.
219// If WithKid is not used a thumbprint using SHA256 will be used.
220func WithKid(s string) Options {
221 return func(c *Claims) error {
222 if s == "" {
223 return errors.New("kid cannot be empty")
224 }
225 c.SetHeader("kid", s)
226 return nil
227 }
228}
229
230// WithX5CFile returns a Options that sets the header x5c claims.
231func WithX5CFile(certFile string, key interface{}) Options {

Callers 2

TokenMethod · 0.92
TestOptionsFunction · 0.85

Calls 1

SetHeaderMethod · 0.80

Tested by 1

TestOptionsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…