summaryrefslogtreecommitdiff
path: root/lib/apiauth.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/apiauth.php')
-rw-r--r--lib/apiauth.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php
index 95acbbd7b..9c68e2771 100644
--- a/lib/apiauth.php
+++ b/lib/apiauth.php
@@ -34,6 +34,24 @@
* @link http://status.net/
*/
+/* External API usage documentation. Please update when you change how this method works. */
+
+/*! @page authentication Authentication
+
+ StatusNet supports HTTP Basic Authentication and OAuth for API calls.
+
+ @warning Currently, users who have created accounts without setting a
+ password via OpenID, Facebook Connect, etc., cannot use the API until
+ they set a password with their account settings panel.
+
+ @section HTTP Basic Auth
+
+
+
+ @section OAuth
+
+*/
+
if (!defined('STATUSNET')) {
exit(1);
}
@@ -90,6 +108,7 @@ class ApiAuthAction extends ApiAction
if ($this->isReadOnly($args) == false) {
if ($this->access != self::READ_WRITE) {
+ // TRANS: Client error 401.
$msg = _('API resource requires read-write access, ' .
'but you only have read access.');
$this->clientError($msg, 401, $this->format);
@@ -272,8 +291,8 @@ class ApiAuthAction extends ApiAction
list($proxy, $ip) = common_client_ip();
- $msg = sprintf(_('Failed API auth attempt, nickname = %1$s, ' .
- 'proxy = %2$s, ip = %3$s'),
+ $msg = sprintf( 'Failed API auth attempt, nickname = %1$s, ' .
+ 'proxy = %2$s, ip = %3$s',
$this->auth_user_nickname,
$proxy,
$ip);