diff --git a/app/extensions/_module.js b/app/extensions/_module.js
index 5a936d2cf..7ad877aa6 100644
--- a/app/extensions/_module.js
+++ b/app/extensions/_module.js
@@ -1,3 +1,4 @@
angular.module('portainer.extensions', [
- 'portainer.extensions.registrymanagement'
+ 'portainer.extensions.registrymanagement',
+ 'portainer.extensions.oauth'
]);
diff --git a/app/extensions/oauth/__module.js b/app/extensions/oauth/__module.js
new file mode 100644
index 000000000..80b17e495
--- /dev/null
+++ b/app/extensions/oauth/__module.js
@@ -0,0 +1 @@
+angular.module('portainer.extensions.oauth', []);
\ No newline at end of file
diff --git a/app/extensions/oauth/components/oauth-settings/oauth-settings-controller.js b/app/extensions/oauth/components/oauth-settings/oauth-settings-controller.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/extensions/oauth/components/oauth-settings/oauth-settings.html b/app/extensions/oauth/components/oauth-settings/oauth-settings.html
new file mode 100644
index 000000000..49f923e12
--- /dev/null
+++ b/app/extensions/oauth/components/oauth-settings/oauth-settings.html
@@ -0,0 +1,164 @@
+
+
OAuth Configuration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ With automatic user provisioning enabled, Portainer will create user(s) automatically with standard user role. If
+ disabled, users must be created in Portainer in order to login.
+
+
+
+
diff --git a/app/extensions/oauth/components/oauth-settings/oauth-settings.js b/app/extensions/oauth/components/oauth-settings/oauth-settings.js
new file mode 100644
index 000000000..9301a0e12
--- /dev/null
+++ b/app/extensions/oauth/components/oauth-settings/oauth-settings.js
@@ -0,0 +1,7 @@
+angular.module('portainer.extensions.oauth').component('oauthSettings', {
+ templateUrl: 'app/extensions/oauth/components/oauth-settings/oauth-settings.html',
+ bindings: {
+ settings: '<'
+ }
+ // controller: 'oauthSettingsController'
+});
diff --git a/app/portainer/views/auth/authController.js b/app/portainer/views/auth/authController.js
index 8499a1a20..9c80ba721 100644
--- a/app/portainer/views/auth/authController.js
+++ b/app/portainer/views/auth/authController.js
@@ -11,9 +11,6 @@ function (urlHelper, $q, $scope, $state, $stateParams, $sanitize, Authentication
$scope.state = {
AuthenticationError: ''
};
-
-
-
$scope.authenticateUser = function() {
var username = $scope.formValues.Username;
diff --git a/app/portainer/views/settings/authentication/settingsAuthentication.html b/app/portainer/views/settings/authentication/settingsAuthentication.html
index 1cef110f7..8c46a5aca 100644
--- a/app/portainer/views/settings/authentication/settingsAuthentication.html
+++ b/app/portainer/views/settings/authentication/settingsAuthentication.html
@@ -321,108 +321,7 @@
-
-
-
- OAuth Configuration
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- With automatic user provisioning enabled, Portainer will create user(s) automatically with standard user role. If disabled, users must be created in Portainer in order to login.
-
-
-
-
+
diff --git a/app/portainer/views/settings/authentication/settingsAuthenticationController.js b/app/portainer/views/settings/authentication/settingsAuthenticationController.js
index 81f096942..a94dfd658 100644
--- a/app/portainer/views/settings/authentication/settingsAuthenticationController.js
+++ b/app/portainer/views/settings/authentication/settingsAuthenticationController.js
@@ -14,6 +14,10 @@ function ($q, $scope, Notifications, SettingsService, FileUploadService) {
TLSCACert: ''
};
+ $scope.isOauthEnabled = function isOauthEnabled() {
+ return $scope.settings.AuthenticationMethod === 3;
+ };
+
$scope.addSearchConfiguration = function() {
$scope.LDAPSettings.SearchSettings.push({ BaseDN: '', UserNameAttribute: '', Filter: '' });
};