| 63 | } |
| 64 | |
| 65 | func 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 | |
| 75 | type wizardFormValues struct { |
| 76 | ProfileName string |