summaryrefslogtreecommitdiff
path: root/lib/apiauth.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2009-10-12 15:12:20 -0700
committerZach Copley <zach@status.net>2009-10-12 15:12:20 -0700
commit4efbe32f6ae2d0300299b1103294f881a03f929d (patch)
tree1fb26527dd14d87435a5358136d0ca1b31f68bdf /lib/apiauth.php
parentda9d02b0381e1acb2a5250392d91b0ebe6e87c1b (diff)
Use site's name for basic auth realm
Diffstat (limited to 'lib/apiauth.php')
-rw-r--r--lib/apiauth.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php
index 25bbae24e..4e5e0ccd9 100644
--- a/lib/apiauth.php
+++ b/lib/apiauth.php
@@ -31,7 +31,7 @@ if (!defined('STATUSNET')) {
exit(1);
}
-require_once INSTALLDIR.'/lib/api.php';
+require_once INSTALLDIR . '/lib/api.php';
/**
* Actions extending this class will require auth
@@ -90,8 +90,10 @@ class ApiAuthAction extends ApiAction
{
$this->basicAuthProcessHeader();
+ $realm = common_config('site', 'name') . ' API';
+
if (!isset($this->auth_user)) {
- header('WWW-Authenticate: Basic realm="StatusNet API"');
+ header('WWW-Authenticate: Basic realm="' . $realm . '"');
// show error if the user clicks 'cancel'