auth/store/store.go

19 lines
308 B
Go
Raw Normal View History

2023-10-21 08:26:15 +00:00
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
}