19 lines
308 B
Go
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
|
||
|
}
|