WithJWTID returns a Options that sets the jwtID to use in the token claims. If WithJWTID is not used a random identifier will be used.
(s string)
| 206 | // WithJWTID returns a Options that sets the jwtID to use in the token |
| 207 | // claims. If WithJWTID is not used a random identifier will be used. |
| 208 | func WithJWTID(s string) Options { |
| 209 | return func(c *Claims) error { |
| 210 | if s == "" { |
| 211 | return errors.New("jwtID cannot be empty") |
| 212 | } |
| 213 | c.ID = s |
| 214 | return nil |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | // WithKid returns a Options that sets the header kid claims. |
| 219 | // If WithKid is not used a thumbprint using SHA256 will be used. |
no outgoing calls
searching dependent graphs…