Skip to content

Commit

Permalink
More americanisation. Fixes #1 again
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Buhr committed Aug 15, 2014
1 parent 6af6e7c commit bf846ed
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion middleware_auth_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (k *AuthKey) ProcessRequest(w http.ResponseWriter, r *http.Request, configu
"origin": r.RemoteAddr,
}).Info("Attempted access with malformed header, no auth header found.")

return errors.New("Authorisation field missing"), 400
return errors.New("Authorization field missing"), 400
}

// Check if API key valid
Expand Down
2 changes: 1 addition & 1 deletion middleware_basic_auth_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (k *BasicAuthKeyIsValid) ProcessRequest(w http.ResponseWriter, r *http.Requ
authReply := "Basic realm=\"" + k.TykMiddleware.Spec.Name + "\""

w.Header().Add("WWW-Authenticate", authReply)
return errors.New("Authorisation field missing"), 401
return errors.New("Authorization field missing"), 401
}

bits := strings.Split(authHeaderValue, " ")
Expand Down
4 changes: 2 additions & 2 deletions middleware_check_HMAC_signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func (hm *HMACMiddleware) authorizationError(w http.ResponseWriter, r *http.Requ
log.WithFields(logrus.Fields{
"path": r.URL.Path,
"origin": r.RemoteAddr,
}).Info("Authorisation field missing or malformed")
}).Info("Authorization field missing or malformed")

return errors.New("Authorisation field missing, malformed or invalid"), 400
return errors.New("Authorization field missing, malformed or invalid"), 400
}

// New lets you do any initialisations for the object can be done here
Expand Down
2 changes: 1 addition & 1 deletion middleware_oauth2_key_exists.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (k *Oauth2KeyExists) ProcessRequest(w http.ResponseWriter, r *http.Request,
"origin": r.RemoteAddr,
}).Info("Attempted access with malformed header, no auth header found.")

return errors.New("Authorisation field missing"), 400
return errors.New("Authorization field missing"), 400
}

if strings.ToLower(parts[0]) != "bearer" {
Expand Down

0 comments on commit bf846ed

Please sign in to comment.