-
- // basic authentication failed
-
- list($proxy, $ip) = common_client_ip();
-
- $msg = sprintf( 'Failed API auth attempt, nickname = %1$s, ' .
- 'proxy = %2$s, ip = %3$s',
- $this->auth_user_nickname,
- $proxy,
- $ip);
- common_log(LOG_WARNING, $msg);
- $this->clientError("Could not authenticate you.", 401, $this->format);
+ $msg = sprintf(
+ "basic auth nickname = %s",
+ $this->auth_user_nickname
+ );
+ $this->logAuthFailure($msg);
+ // TRANS: Client error thrown when authentication fails.
+ $this->clientError(_('Could not authenticate you.'), 401, $this->format);