Documentation
¶
Overview ¶
Package token generates and hashes the random secrets moth hands out: publishable/secret API keys, admin session tokens, setup tokens.
Index ¶
Constants ¶
View Source
const ( PublishableKeyPrefix = "pk_" SecretKeyPrefix = "sk_" )
Prefixes for project API keys.
View Source
const PATPrefix = "moth_pat_"
PATPrefix is the prefix of admin personal access tokens, the credential the moth CLI presents as `authorization: Bearer` metadata.
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
Hash returns the hex SHA-256 of a token. High-entropy random tokens need no salt or slow KDF.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.