14 lines
313 B
Go
14 lines
313 B
Go
package storage
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gardomatic.kleiax.de/internal/auth"
|
|
)
|
|
|
|
// TokenModelInterface persists scoped, expiring authentication token hashes.
|
|
type TokenModelInterface interface {
|
|
New(userID int, ttl time.Duration, scope string) (auth.Token, error)
|
|
DeleteAllForUser(scope string, userID int) error
|
|
}
|