mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-10 14:33:14 -05:00
add JWTAuth#ValidateOptions method
This commit is contained in:
parent
fc3832839d
commit
ecb7305746
1 changed files with 4 additions and 0 deletions
|
|
@ -136,6 +136,10 @@ func (ja *JWTAuth) Decode(tokenString string) (jwt.Token, error) {
|
|||
return ja.parse([]byte(tokenString))
|
||||
}
|
||||
|
||||
func (ja *JWTAuth) ValidateOptions() []jwt.ValidateOption {
|
||||
return ja.validateOptions
|
||||
}
|
||||
|
||||
func (ja *JWTAuth) sign(token jwt.Token) ([]byte, error) {
|
||||
return jwt.Sign(token, jwt.WithKey(ja.alg, ja.signKey))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue