WithIssuer returns an Options function that sets the issuer to use in the token claims. If Issuer is not used the default issuer will be used.
(s string)
| 170 | // WithIssuer returns an Options function that sets the issuer to use in the |
| 171 | // token claims. If Issuer is not used the default issuer will be used. |
| 172 | func WithIssuer(s string) Options { |
| 173 | return func(c *Claims) error { |
| 174 | if s == "" { |
| 175 | return errors.New("issuer cannot be empty") |
| 176 | } |
| 177 | c.Issuer = s |
| 178 | return nil |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | // WithSubject returns an Options that sets the subject to use in the token |
| 183 | // claims. |
no outgoing calls
searching dependent graphs…