diff --git a/broker/saml/src/main/java/org/keycloak/broker/saml/SAMLIdentityProvider.java b/broker/saml/src/main/java/org/keycloak/broker/saml/SAMLIdentityProvider.java index 05db2c2126..6ce34fcb5b 100644 --- a/broker/saml/src/main/java/org/keycloak/broker/saml/SAMLIdentityProvider.java +++ b/broker/saml/src/main/java/org/keycloak/broker/saml/SAMLIdentityProvider.java @@ -121,6 +121,7 @@ public class SAMLIdentityProvider extends AbstractIdentityProvider keyDescriptor = idpDescriptor.getKeyDescriptor(); String defaultPublicKey = null; diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js index 2f12f94f39..c9dfd55200 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/realm.js @@ -631,14 +631,11 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload if (instance && instance.id) { $scope.identityProvider = angular.copy(instance); - - // fixme: this is a hack to make onofswith work and recognize string representation of boolean values - $scope.identityProvider.config.validateSignature = $scope.getBoolean($scope.identityProvider.config.validateSignature); - $scope.identityProvider.config.forceAuthn = $scope.getBoolean($scope.identityProvider.config.forceAuthn); $scope.newIdentityProvider = false; } else { $scope.identityProvider = {}; - $scope.identityProvider.id = providerFactory.id; + $scope.identityProvider.config = {}; + $scope.identityProvider.id = ""; $scope.identityProvider.providerId = providerFactory.id; $scope.identityProvider.name = providerFactory.name; $scope.identityProvider.enabled = true; @@ -762,6 +759,18 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload return value; } } + + $scope.initSamlProvider = function() { + if (instance && instance.id) { + $scope.identityProvider.config.validateSignature = $scope.getBoolean($scope.identityProvider.config.validateSignature); + $scope.identityProvider.config.forceAuthn = $scope.getBoolean($scope.identityProvider.config.forceAuthn); + $scope.identityProvider.config.postBindingAuthnRequest = $scope.getBoolean($scope.identityProvider.config.postBindingAuthnRequest); + $scope.identityProvider.config.postBindingResponse = $scope.getBoolean($scope.identityProvider.config.postBindingResponse); + $scope.identityProvider.config.wantAuthnRequestsSigned = $scope.getBoolean($scope.identityProvider.config.wantAuthnRequestsSigned); + } else { + $scope.identityProvider.config.postBindingResponse = true; + } + } }); module.controller('RealmTokenDetailCtrl', function($scope, Realm, realm, $http, $location, $route, Dialog, Notifications, TimeUnit) { diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-identity-provider-saml.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-identity-provider-saml.html index 5624e54834..5a87057295 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-identity-provider-saml.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/realm-identity-provider-saml.html @@ -1,5 +1,5 @@
-
+

@@ -44,7 +44,7 @@
-
+
@@ -58,28 +58,35 @@
-
+
+ +
+ +
+ +
+
-
+
-
+
-
+