Documentation
¶
Index ¶
- func AddRevokedAuthTokens(tokens map[string]time.Time)
- func IsRevokedAuthToken(tokenID string) bool
- func RemoveRevokedAuthToken(token string)
- func StartDeletingExpiredTokens(interval time.Duration)
- type AuthTokens
- func (cache *AuthTokens) AddAuthTokens(tokens map[string]time.Time)
- func (cache *AuthTokens) DeleteExpiredAuthTokens(interval time.Duration)
- func (cache *AuthTokens) GetExpiredAuthTokens() []string
- func (cache *AuthTokens) IsAuthTokenPresent(token string) bool
- func (cache *AuthTokens) RemoveAuthToken(token string)
- func (cache *AuthTokens) RemoveAuthTokens(tokens []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRevokedAuthTokens ¶
AddRevokedAuthTokens : adds revoked auth tokens to the list.
func IsRevokedAuthToken ¶
IsRevokedAuthToken : returns true if the tokenID is revoked.
func RemoveRevokedAuthToken ¶
func RemoveRevokedAuthToken(token string)
RemoveRevokedAuthToken : removes a revoked auth token from the list.
func StartDeletingExpiredTokens ¶
StartDeletingExpiredTokens : start deleting the expired auth tokens verry 'interval' seconds.
Types ¶
type AuthTokens ¶
type AuthTokens struct {
// contains filtered or unexported fields
}
AuthTokens : cached auth tokens.
func (*AuthTokens) AddAuthTokens ¶
func (cache *AuthTokens) AddAuthTokens(tokens map[string]time.Time)
AddAuthTokens : adds auth tokens to the list.
func (*AuthTokens) DeleteExpiredAuthTokens ¶
func (cache *AuthTokens) DeleteExpiredAuthTokens(interval time.Duration)
DeleteExpiredAuthTokens : deletes all the expired auth tokens every 'interval' seconds.
func (*AuthTokens) GetExpiredAuthTokens ¶
func (cache *AuthTokens) GetExpiredAuthTokens() []string
GetExpiredAuthTokens : get the expired tokens from the list.
func (*AuthTokens) IsAuthTokenPresent ¶
func (cache *AuthTokens) IsAuthTokenPresent(token string) bool
IsAuthTokenPresent : returns true if the tokenID is found.
func (*AuthTokens) RemoveAuthToken ¶
func (cache *AuthTokens) RemoveAuthToken(token string)
RemoveAuthToken : removes a token from the list.
func (*AuthTokens) RemoveAuthTokens ¶
func (cache *AuthTokens) RemoveAuthTokens(tokens []string)
RemoveAuthTokens : removes tokens from the list.