Use site's name for basic auth realm

This commit is contained in:
Zach Copley 2009-10-12 15:12:20 -07:00
parent da9d02b038
commit 4efbe32f6a
1 changed files with 4 additions and 2 deletions

View File

@ -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'