SetHeader adds the given key and value to the map of extra headers.
(key string, value interface{})
| 61 | |
| 62 | // SetHeader adds the given key and value to the map of extra headers. |
| 63 | func (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. |
| 71 | func (c *Claims) Sign(alg jose.SignatureAlgorithm, key interface{}) (string, error) { |
no outgoing calls