From a092da7535099b4a618bbca6faaa4af5b2aa48e4 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Wed, 18 Apr 2018 17:33:48 -0400 Subject: #613 get basic auth from wizard --- www/js/LoginCtrl.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'www/js') diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index f8703cc2..a2fd1ff1 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -265,13 +265,29 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r $scope.loginData.url = $rootScope.wizard.loginURL; $scope.loginData.apiurl = $rootScope.wizard.apiURL; $scope.loginData.streamingurl = $rootScope.wizard.streamingURL; + if ($rootScope.wizard.useauth && $rootScope.wizard.usezmauth) { $scope.loginData.username = $rootScope.wizard.zmuser; $scope.loginData.password = $rootScope.wizard.zmpassword; + $scope.loginData.isUseAuth = true; + + } else { $scope.loginData.isUseAuth = false; } + // 'isUseBasicAuth': false, + // 'basicAuthUser': '', + // 'basicAuthPassword': '', + + if ($rootScope.wizard.useauth && $rootScope.wizard.usebasicauth) { + $scope.loginData.basicAuthUser = $rootScope.wizard.basicuser; + $scope.loginData.basicAuthPassword = $rootScope.wizard.basicpassword; + $scope.loginData.isUseBasicAuth = true; + } else { + $scope.loginData.isUseBasicAuth = false; + } + if ((/^https:\/\//i.test($scope.loginData.url))) { $scope.loginData.useSSL = true; } -- cgit v1.2.3