Skip to content

Commit 9f3e7f7

Browse files
committed
[jwt] fix params naming
1 parent 4c6d149 commit 9f3e7f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/sms-gateway/jwt/revoked.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ func NewRevokedStorage(storage cache.Cache) *RevokedStorage {
1919
}
2020
}
2121

22-
func (r *RevokedStorage) IsRevoked(ctx context.Context, token string) (bool, error) {
23-
_, err := r.storage.Get(ctx, token)
22+
func (r *RevokedStorage) IsRevoked(ctx context.Context, jti string) (bool, error) {
23+
_, err := r.storage.Get(ctx, jti)
2424
if errors.Is(err, cache.ErrKeyNotFound) {
2525
return false, nil
2626
}
@@ -31,6 +31,6 @@ func (r *RevokedStorage) IsRevoked(ctx context.Context, token string) (bool, err
3131
return true, nil
3232
}
3333

34-
func (r *RevokedStorage) Revoke(ctx context.Context, token string, ttl time.Duration) error {
35-
return r.storage.Set(ctx, token, nil, cache.WithTTL(ttl))
34+
func (r *RevokedStorage) Revoke(ctx context.Context, jti string, ttl time.Duration) error {
35+
return r.storage.Set(ctx, jti, nil, cache.WithTTL(ttl))
3636
}

0 commit comments

Comments
 (0)