summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-09 11:27:30 -0800
committerBrion Vibber <brion@pobox.com>2010-03-09 11:27:30 -0800
commit4caf0d2e73f97c3ee99b2aa902f996e9d3bbab9f (patch)
tree67a3e8112430c003acab323f476db532e04fa943 /lib
parent72e4c733735ac590599bef392611314370135b37 (diff)
parent58192ad68758437a37d8af19d6676d35699ed070 (diff)
Merge commit 'origin/master' into testing
Diffstat (limited to 'lib')
-rw-r--r--lib/apiauth.php6
-rw-r--r--lib/default.php2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php
index 5090871cf..f63c84d8f 100644
--- a/lib/apiauth.php
+++ b/lib/apiauth.php
@@ -235,7 +235,11 @@ class ApiAuthAction extends ApiAction
{
$this->basicAuthProcessHeader();
- $realm = common_config('site', 'name') . ' API';
+ $realm = common_config('api', 'realm');
+
+ if (empty($realm)) {
+ $realm = common_config('site', 'name') . ' API';
+ }
if (!isset($this->auth_user_nickname) && $required) {
header('WWW-Authenticate: Basic realm="' . $realm . '"');
diff --git a/lib/default.php b/lib/default.php
index bdd78d4d8..46d3d4774 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -293,4 +293,6 @@ $default =
array('crawldelay' => 0,
'disallow' => array('main', 'settings', 'admin', 'search', 'message')
),
+ 'api' =>
+ array('realm' => null),
);