WithKid returns a Options that sets the header kid claims. If WithKid is not used a thumbprint using SHA256 will be used.
(s string)
| 218 | // WithKid returns a Options that sets the header kid claims. |
| 219 | // If WithKid is not used a thumbprint using SHA256 will be used. |
| 220 | func 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. |
| 231 | func WithX5CFile(certFile string, key interface{}) Options { |
searching dependent graphs…