Documentation ¶
Index ¶
- Constants
- func GenerateAPIToken(dataDir, tokenFilename string) (string, error)
- func GetAndValidateAPIToken(dataDir, tokenFilename string) (string, error)
- func ValidateAPIToken(apiToken string) error
- func ValidateOrGenerateAPIToken(dataDir, tokenFilename string) (apiToken string, wroteToken bool, err error)
Constants ¶
View Source
const ( AlgodTokenFilename = "algod.token" AlgodAdminTokenFilename = "algod.admin.token" KmdTokenFilename = "kmd.token" )
API tokens that live in the datadirs of their respective daemons
Variables ¶
This section is empty.
Functions ¶
func GenerateAPIToken ¶
GenerateAPIToken writes a cryptographically secure APIToken to disk
func GetAndValidateAPIToken ¶
GetAndValidateAPIToken reads the APIToken from the token file and validates it. Always returns the potentially invalid token along with the error GetAndValidateAPIToken은 토큰 파일에서 APIToken을 읽고 유효성을 검사합니다. 항상 오류와 함께 잠재적으로 유효하지 않은 토큰을 반환합니다.
func ValidateAPIToken ¶
ValidateAPIToken returns a non-nil error if the passed APIToken fails our validation checks
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.