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

Method SetHeader

token/token.go:63–68  ·  view source on GitHub ↗

SetHeader adds the given key and value to the map of extra headers.

(key string, value interface{})

Source from the content-addressed store, hash-verified

61
62// SetHeader adds the given key and value to the map of extra headers.
63func (c *Claims) SetHeader(key string, value interface{}) {
64 if c.ExtraHeaders == nil {
65 c.ExtraHeaders = make(map[string]interface{})
66 }
67 c.ExtraHeaders[key] = value
68}
69
70// Sign creates a JWT with the claims and signs it with the given key.
71func (c *Claims) Sign(alg jose.SignatureAlgorithm, key interface{}) (string, error) {

Callers 8

TestClaims_SetHeaderFunction · 0.95
WithKidFunction · 0.80
WithX5CFileFunction · 0.80
WithX5CCertsFunction · 0.80
WithNebulaCertFunction · 0.80
WithX5CInsecureFileFunction · 0.80
WithX5CInsecureCertsFunction · 0.80
WithSSHPOPFileFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestClaims_SetHeaderFunction · 0.76