Skip to content
Snippets Groups Projects
Unverified Commit f83af2ea authored by pjfa's avatar pjfa Committed by GitHub
Browse files

Merge pull request #26 from hatamiarash7/new-api-format

Support new API key format
parents 4bc16ea6 b824b5a2
Branches master
Tags v1.3.6
No related merge requests found
......@@ -130,7 +130,7 @@ func getApiKey(in io.Reader, writer io.Writer) string {
}
func apiKeyValidator(input string) (bool, error) {
var validApiKey = regexp.MustCompile(`^Apikey [a-z0-9\-]+$$`)
var validApiKey = regexp.MustCompile(`^(A|a)pikey [a-z0-9\-]+$$`)
if !validApiKey.MatchString(input) {
return false, errors.New("API token should be in format: 'Apikey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'")
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment