Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthStore ¶
type AuthStore struct {
// contains filtered or unexported fields
}
func NewAuthStore ¶
func (*AuthStore) CountTokens ¶ added in v0.1.40
CountTokens returns the number of stored auth tokens.
func (*AuthStore) CreateToken ¶
func (*AuthStore) DeleteToken ¶ added in v0.1.40
DeleteToken removes the auth token with the given id, revoking it. It returns an error if no token with that id exists.
func (*AuthStore) ListTokens ¶ added in v0.1.40
ListTokens returns metadata for all stored auth tokens, newest first.
type TokenInfo ¶ added in v0.1.40
type TokenInfo struct {
ID int64 `db:"id"`
TokenPrefix string `db:"token_prefix"`
CreatedAt string `db:"created_at"`
}
TokenInfo is the non-secret metadata about a stored auth token. The token plaintext is never recoverable (only a salted Argon2 hash is stored), so listing exposes just the id, short prefix, and creation time.
Click to show internal directories.
Click to hide internal directories.