23 lines
426 B
Go
23 lines
426 B
Go
package veritification
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Verify interface {
|
|
ApplicationToken(string) (map[string]string, error)
|
|
Identity(map[string]string, string) (map[string]string, error)
|
|
}
|
|
|
|
func NewRuntimeVerify() Verify {
|
|
return &runtimeVerify{}
|
|
}
|
|
|
|
func NewCacheablesVerify(timeout time.Duration) Verify {
|
|
return &cacheablesVerify{
|
|
cache: make(map[string]cacheInfo),
|
|
timeout: timeout,
|
|
rv: &runtimeVerify{},
|
|
}
|
|
}
|