WithTimeFunc returns the ParserOption for specifying the time func. The primary use-case for this is testing. If you are looking for a way to account for clock-skew, WithLeeway should be used instead.
(f func() time.Time)
| 43 | // primary use-case for this is testing. If you are looking for a way to account |
| 44 | // for clock-skew, WithLeeway should be used instead. |
| 45 | func WithTimeFunc(f func() time.Time) ParserOption { |
| 46 | return func(p *Parser) { |
| 47 | p.validator.timeFunc = f |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // WithIssuedAt returns the ParserOption to enable verification |
| 52 | // of issued-at. |
no outgoing calls