mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-24 15:00:25 +02:00
replace the custom ratelimiter strategy with a fixed window
This commit is contained in:
1 parent
29c2e209f4
commit
70d8d1ee9d
5 files changed
+32
-50
No files matched your search
@@ -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