Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token represents parsed authentication token used to access the Redis server. It implements the auth.Credentials interface.
func New ¶
New creates a new token with the specified username, password, raw token, expiration time, received at time, and time to live. NOTE: This won't do any validation on the token, expiresOn, receivedAt, or ttl. It will simply create a new token instance. The caller is responsible for ensuring the token is valid. Expiration time and TTL are used to determine when the token should be refreshed. TTL is in milliseconds. receivedAt + ttl should be within a millisecond of expiresOn
func (*Token) ExpirationOn ¶
ExpirationOn returns the expiration time of the token.
func (*Token) RawCredentials ¶
RawCredentials returns the raw credentials for authentication.
func (*Token) ReceivedAt ¶
ReceivedAt returns the time when the token was received.