auth/store/store.go
2023-10-21 10:26:15 +02:00

19 lines
308 B
Go

package store
import "time"
type RevokableToken struct {
ID string
Subject string
ExpiresAt time.Time
Revoked bool
}
type AuthStore interface {
Add(token RevokableToken) error
Remove(id string) error
Revoke(id string) error
RevokeUser(subject string) error
IsRevoked(id string) bool
}