thread-master/backend/internal/model/auth/domain/repository/token_revoke.go

15 lines
454 B
Go
Raw Normal View History

2026-06-26 08:37:04 +00:00
package repository
import (
"context"
"time"
)
type TokenRevokeStore interface {
SavePair(ctx context.Context, accessJTI, refreshJTI string, accessTTL, refreshTTL time.Duration) error
GetPairedJTI(ctx context.Context, jti string) (string, error)
DeletePair(ctx context.Context, accessJTI, refreshJTI string) error
Blacklist(ctx context.Context, jti string, ttl time.Duration) error
IsBlacklisted(ctx context.Context, jti string) (bool, error)
}