WithAudience returns a Options that sets the audience to use in the token claims. If Audience is not used the default audience will be used.
(s string)
| 194 | // WithAudience returns a Options that sets the audience to use in the token |
| 195 | // claims. If Audience is not used the default audience will be used. |
| 196 | func WithAudience(s string) Options { |
| 197 | return func(c *Claims) error { |
| 198 | if s == "" { |
| 199 | return errors.New("audience cannot be empty") |
| 200 | } |
| 201 | c.Audience = append(jose.Audience{}, s) |
| 202 | return nil |
| 203 | } |
| 204 | } |
| 205 | |
| 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. |
no outgoing calls
searching dependent graphs…