MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / validateWizardAuth

Function validateWizardAuth

internal/ui/components/config_wizard.go:65–73  ·  view source on GitHub ↗
(password, tokenID, tokenSecret string)

Source from the content-addressed store, hash-verified

63}
64
65func validateWizardAuth(password, tokenID, tokenSecret string) (bool, bool, string) {
66 hasPassword, hasToken := wizardAuthState(password, tokenID, tokenSecret)
67 tokenIDSet := strings.TrimSpace(tokenID) != ""
68 tokenSecretSet := strings.TrimSpace(tokenSecret) != ""
69 if tokenIDSet != tokenSecretSet {
70 return hasPassword, hasToken, "API token authentication requires both a token ID and token secret."
71 }
72 return hasPassword, hasToken, ""
73}
74
75type wizardFormValues struct {
76 ProfileName string

Callers 2

NewConfigWizardPageFunction · 0.85
TestValidateWizardAuthFunction · 0.85

Calls 1

wizardAuthStateFunction · 0.85

Tested by 1

TestValidateWizardAuthFunction · 0.68