jwt-go
jwt-go copied to clipboard
Add a ParserOption to specify nowFunc
There is no way to set ValidationHelper.nowFunc
although jwt-go provides an internal way to override time.Now
by setting nowFunc
. So I added a new ParserOption WithTimeFunc
to utilize the feature of nowFunc
.
The name WithTimeFunc
is taken after TimeFunc
global variable in order to give consistency to the name of exported functions and variables.