Documentation
¶
Index ¶
- Constants
- func BcryptTokenInput(token string) []byte
- func FastTokenHash(token string) string
- func GenerateAgentToken() (plaintext, prefix string, err error)
- func GenerateUserToken() (plaintext, prefix string, err error)
- func HasAnyPrefix(token string, prefixes ...string) bool
- func ValidLengthForPrefix(token, tokenPrefix string) bool
- func VerifyFastTokenHash(storedHash, token string) bool
- func VerifyTokenHash(storedHash, token string) bool
Constants ¶
View Source
const ( UserTokenPrefix = "ol_user_" AgentTokenPrefix = "ol_agent_" RandomBytes = 32 PrefixLen = len(UserTokenPrefix) + 4 // BcryptCost is the default cost for persisted credential hashes. BcryptCost = 12 FastTokenHashPrefix = "sha256:" )
Variables ¶
This section is empty.
Functions ¶
func BcryptTokenInput ¶
func FastTokenHash ¶
func GenerateAgentToken ¶
func GenerateUserToken ¶
func HasAnyPrefix ¶
func ValidLengthForPrefix ¶
func VerifyFastTokenHash ¶
func VerifyTokenHash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.