diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-18 17:33:48 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-18 17:33:48 -0400 |
| commit | a092da7535099b4a618bbca6faaa4af5b2aa48e4 (patch) | |
| tree | c9d34ef927292d9b52b07e6fa6f76f335b7ad49b /www/js | |
| parent | 14810e783f49d7bd01e7c66d841fc663bde414aa (diff) | |
#613 get basic auth from wizard
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/LoginCtrl.js | 16 |
1 files changed, 16 insertions, 0 deletions
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; } |
