Commit 14784ea0 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1894756: Set extra headers correctly for client_connnection



So that the wstoken is seperate from extra headers and we can define
the full header in form field

Also have the correct nav menu when editing connection

Change-Id: I12a3b8d699d8da55718dba81c9ad31cfab9d2300
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent 4346a471
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -2436,9 +2436,8 @@ abstract class Plugin implements IPlugin {
            if (!empty($c->token)) {
                $authtype = 'token';
                if ($c->useheader) {
                    $auth['header'] = (empty($c->header) ? 'Authorization' : $c->header . ": " . $c->token);
                    $auth['header'] = (!empty($c->header) ? $c->header : '');
                }
                else {
                if (strpos($c->token, '=')) {
                    list($k, $v) = explode('=', $c->token);
                    $auth[$k] = $v;
@@ -2447,7 +2446,6 @@ abstract class Plugin implements IPlugin {
                    $auth['wstoken'] = $c->token;
                }
            }
            }
            else if (!empty($c->username) && !empty($c->password) ) {
                $authtype = 'user';
                if (strpos($c->username, '=')) {
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ define('ADMIN', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('webservices_title', 'auth.webservice'));
define('SUBSECTIONHEADING', get_string('addconnection', 'auth.webservice'));
define('MENUITEM', 'webservices/connections');
define('INADMINMENU', 1);

$institution = param_variable('i');
$connector   = param_variable('p', '');