diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js index 7819f8b2cf..903131d0d1 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/app.js @@ -638,6 +638,9 @@ module.config([ '$routeProvider', function($routeProvider) { }, clientAuthenticatorProviders : function(ClientAuthenticatorProvidersLoader) { return ClientAuthenticatorProvidersLoader(); + }, + clientConfigProperties: function(PerClientAuthenticationConfigDescriptionLoader) { + return PerClientAuthenticationConfigDescriptionLoader(); } }, controller : 'ClientCredentialsCtrl' diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js index 46f6c9a494..ae334e73c6 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js @@ -30,39 +30,12 @@ module.controller('ClientRoleListCtrl', function($scope, $location, realm, clien }); }); -module.controller('ClientCredentialsCtrl', function($scope, $location, realm, client, clientAuthenticatorProviders, Client) { +module.controller('ClientCredentialsCtrl', function($scope, $location, realm, client, clientAuthenticatorProviders, clientConfigProperties, Client) { $scope.realm = realm; $scope.client = angular.copy(client); $scope.clientAuthenticatorProviders = clientAuthenticatorProviders; - var updateConfigButtonVisibility = function() { - for (var i=0 ; i -
- -
+
+
+
+ +
-
-
- - +
+
+ + +
-
- \ No newline at end of file + +
\ No newline at end of file diff --git a/services/src/main/java/org/keycloak/authentication/ClientAuthenticatorFactory.java b/services/src/main/java/org/keycloak/authentication/ClientAuthenticatorFactory.java index 338f9801b2..08321ea922 100644 --- a/services/src/main/java/org/keycloak/authentication/ClientAuthenticatorFactory.java +++ b/services/src/main/java/org/keycloak/authentication/ClientAuthenticatorFactory.java @@ -25,13 +25,6 @@ public interface ClientAuthenticatorFactory extends ProviderFactory getPerClientConfigDescription(@PathParam("providerId") String providerId) { + public Map> getPerClientConfigDescription() { this.auth.requireView(); - ConfigurableAuthenticatorFactory factory = CredentialHelper.getConfigurableAuthenticatorFactory(session, providerId); - ClientAuthenticatorFactory clientAuthFactory = (ClientAuthenticatorFactory) factory; - List perClientConfigProps = clientAuthFactory.getConfigPropertiesPerClient(); - List result = new LinkedList<>(); - for (ProviderConfigProperty prop : perClientConfigProps) { - ConfigPropertyRepresentation propRep = getConfigPropertyRep(prop); - result.add(propRep); + List factories = session.getKeycloakSessionFactory().getProviderFactories(ClientAuthenticator.class); + + Map> toReturn = new HashMap<>(); + for (ProviderFactory clientAuthenticatorFactory : factories) { + String providerId = clientAuthenticatorFactory.getId(); + ConfigurableAuthenticatorFactory factory = CredentialHelper.getConfigurableAuthenticatorFactory(session, providerId); + ClientAuthenticatorFactory clientAuthFactory = (ClientAuthenticatorFactory) factory; + List perClientConfigProps = clientAuthFactory.getConfigPropertiesPerClient(); + List result = new LinkedList<>(); + for (ProviderConfigProperty prop : perClientConfigProps) { + ConfigPropertyRepresentation propRep = getConfigPropertyRep(prop); + result.add(propRep); + } + + toReturn.put(providerId, result); } - return result; + + return toReturn; } @Path("config") diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/PassThroughClientAuthenticator.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/PassThroughClientAuthenticator.java index 0c35b7569c..f45792055e 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/PassThroughClientAuthenticator.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/PassThroughClientAuthenticator.java @@ -68,11 +68,6 @@ public class PassThroughClientAuthenticator extends AbstractClientAuthenticator return false; } - @Override - public boolean isConfigurablePerClient() { - return true; - } - @Override public AuthenticationExecutionModel.Requirement[] getRequirementChoices() { return REQUIREMENT_CHOICES;