Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
TokenStore implements TokenStore completely in memory and uses an LRU cache to limit memory usage
func New ¶
func New(size int, ttl time.Duration) *TokenStore
New returns a new TokenStore with the given cache size (item count) and item ttl
func (*TokenStore) Authenticate ¶
func (t *TokenStore) Authenticate(token string) (identifier string, err error)
Authenticate authenticates the token and returns the associated identifier
Click to show internal directories.
Click to hide internal directories.