Skip to content

Commit f83af2e

Browse files
authored
Merge pull request #26 from hatamiarash7/new-api-format
Support new API key format
2 parents 4bc16ea + b824b5a commit f83af2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/paas/login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func getApiKey(in io.Reader, writer io.Writer) string {
130130
}
131131

132132
func apiKeyValidator(input string) (bool, error) {
133-
var validApiKey = regexp.MustCompile(`^Apikey [a-z0-9\-]+$$`)
133+
var validApiKey = regexp.MustCompile(`^(A|a)pikey [a-z0-9\-]+$$`)
134134
if !validApiKey.MatchString(input) {
135135
return false, errors.New("API token should be in format: 'Apikey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'")
136136
}

0 commit comments

Comments
 (0)