replace the custom ratelimiter strategy with a fixed window
This commit is contained in:
@@ -45,6 +45,8 @@ func ParseJWT(token string, verificationKey string) (jwt.MapClaims, error) {
|
||||
// NewJWT generates and returns new HS256 signed JWT.
|
||||
func NewJWT(payload jwt.MapClaims, signingKey string, duration time.Duration) (string, error) {
|
||||
claims := jwt.MapClaims{
|
||||
// @todo consider with the refactoring to either remove the
|
||||
// duration argument or make it always take precedent?
|
||||
"exp": time.Now().Add(duration).Unix(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user