-

Realms

+

Choose Realm to Manage

diff --git a/services/src/main/java/org/keycloak/services/resources/TokenService.java b/services/src/main/java/org/keycloak/services/resources/TokenService.java index c9355c8917..9e5d039b6e 100755 --- a/services/src/main/java/org/keycloak/services/resources/TokenService.java +++ b/services/src/main/java/org/keycloak/services/resources/TokenService.java @@ -229,7 +229,7 @@ public class TokenService { } if (!realm.isPasswordCredentialGrantAllowed()) { - return createError("not_enabled", "Resource Owner Password Credentials Grant not enabled", Response.Status.FORBIDDEN); + return createError("not_enabled", "Direct Grant REST API not enabled", Response.Status.FORBIDDEN); } audit.event(EventType.LOGIN).detail(Details.AUTH_METHOD, "oauth_credentials").detail(Details.RESPONSE_TYPE, "token"); From 47f361a4ab18c723977a3e3112ae4f5bcafef3bb Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Wed, 20 Aug 2014 11:29:45 -0400 Subject: [PATCH 2/4] nocache for fed provider list --- .../theme/admin/base/resources/partials/federated-generic.html | 2 +- .../services/resources/admin/UserFederationResource.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html index 35b2938b01..1e9c2e2c4c 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html @@ -70,7 +70,7 @@
- +
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java b/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java index f03d4102ec..acee11df1e 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java @@ -192,6 +192,7 @@ public class UserFederationResource { @GET @Path("instances") @Produces("application/json") + @NoCache public List getUserFederationInstances() { logger.info("getUserFederationInstances"); auth.requireManage(); From f6a76e673cc6762de8de968955c1c3ddea069f72 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Wed, 20 Aug 2014 11:40:48 -0400 Subject: [PATCH 3/4] add federation breadcrums --- .../base/resources/partials/federated-generic.html | 13 +++++++++++-- .../base/resources/partials/federated-ldap.html | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html index 1e9c2e2c4c..e5c9017a14 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-generic.html @@ -4,9 +4,18 @@
  • User List
  • Federation
  • -

    -

    {{realm.realm}} Provider Settings

    + + +

    Provider Settings

    +

    Add Federation Provider

    * Required fields

    diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-ldap.html b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-ldap.html index feb53e4e11..3e9f3db139 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-ldap.html +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/partials/federated-ldap.html @@ -4,9 +4,18 @@
  • User List
  • Federation
  • -

    -

    {{realm.realm}} Ldap Server Settings

    + + +

    LDAP Provider Settings

    +

    Add LDAP Provider

    * Required fields

    From 041d0be990c7617b647448b9a83850fbde98e881 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Wed, 20 Aug 2014 11:55:59 -0400 Subject: [PATCH 4/4] add notification messages --- .../resources/js/controllers/applications.js | 44 +++++++---------- .../resources/js/controllers/oauth-clients.js | 47 +++++++++---------- .../base/resources/js/controllers/users.js | 7 ++- 3 files changed, 45 insertions(+), 53 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/applications.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/applications.js index 6c77ae700c..5cc6390881 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/applications.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/applications.js @@ -347,7 +347,7 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application, }); -module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm, application, applications, +module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm, application, applications, Notifications, Application, ApplicationRealmScopeMapping, ApplicationApplicationScopeMapping, ApplicationRole, ApplicationAvailableRealmScopeMapping, ApplicationAvailableApplicationScopeMapping, @@ -375,6 +375,7 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm, $scope.changed = false; application = angular.copy($scope.application); updateRealmRoles(); + Notifications.success("Scope mappings updated."); }); } @@ -399,49 +400,40 @@ module.controller('ApplicationScopeMappingCtrl', function($scope, $http, realm, } } - $scope.addRealmRole = function() { - $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm', $scope.selectedRealmRoles) - .success(updateRealmRoles); - }; - - $scope.deleteRealmRole = function() { - $http.delete(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm', - {data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}) - .success(updateRealmRoles); - }; - - $scope.addApplicationRole = function() { - $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name, - $scope.selectedApplicationRoles).success(updateAppRoles); - }; - - $scope.deleteApplicationRole = function() { - $http.delete(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name, - {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(updateAppRoles); - }; - $scope.changeApplication = function() { updateAppRoles(); }; $scope.addRealmRole = function() { $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm', - $scope.selectedRealmRoles).success(updateRealmRoles); + $scope.selectedRealmRoles).success(function() { + updateRealmRoles(); + Notifications.success("Scope mappings updated."); + }); }; $scope.deleteRealmRole = function() { $http.delete(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/realm', - {data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(updateRealmRoles); + {data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function () { + updateRealmRoles(); + Notifications.success("Scope mappings updated."); + }); }; $scope.addApplicationRole = function() { $http.post(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name, - $scope.selectedApplicationRoles).success(updateAppRoles); + $scope.selectedApplicationRoles).success(function () { + updateAppRoles(); + Notifications.success("Scope mappings updated."); + }); }; $scope.deleteApplicationRole = function() { $http.delete(authUrl + '/admin/realms/' + realm.realm + '/applications/' + application.name + '/scope-mappings/applications/' + $scope.targetApp.name, - {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(updateAppRoles); + {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function () { + updateAppRoles(); + Notifications.success("Scope mappings updated."); + }); }; updateRealmRoles(); diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js index 3f6c1546a7..b37d228e64 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/oauth-clients.js @@ -182,7 +182,7 @@ module.controller('OAuthClientDetailCtrl', function($scope, realm, oauth, OAuthC }); -module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm, oauth, applications, +module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm, oauth, applications, Notifications, OAuthClient, OAuthClientRealmScopeMapping, OAuthClientApplicationScopeMapping, ApplicationRole, OAuthClientAvailableRealmScopeMapping, OAuthClientAvailableApplicationScopeMapping, @@ -208,6 +208,7 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm, }, $scope.oauth, function() { $scope.changed = false; oauth = angular.copy($scope.oauth); + Notifications.success("Scope mappings updated."); }); } @@ -232,49 +233,43 @@ module.controller('OAuthClientScopeMappingCtrl', function($scope, $http, realm, } } - $scope.addRealmRole = function() { - $http.post(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/realm', $scope.selectedRealmRoles) - .success(updateRealmRoles); - }; - - $scope.deleteRealmRole = function() { - $http.delete(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/realm', - {data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}) - .success(updateRealmRoles); - }; - - $scope.addApplicationRole = function() { - $http.post(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/applications/' + $scope.targetApp.name, - $scope.selectedApplicationRoles).success(updateAppRoles); - }; - - $scope.deleteApplicationRole = function() { - $http.delete(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/applications/' + $scope.targetApp.name, - {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(updateAppRoles); - }; - $scope.changeApplication = function() { updateAppRoles(); }; $scope.addRealmRole = function() { $http.post(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/realm', - $scope.selectedRealmRoles).success(updateRealmRoles); + $scope.selectedRealmRoles).success(function () { + updateRealmRoles(); + Notifications.success("Scope mappings updated."); + }); }; $scope.deleteRealmRole = function() { $http.delete(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/realm', - {data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(updateRealmRoles); + {data : $scope.selectedRealmMappings, headers : {"content-type" : "application/json"}}).success(function () { + updateRealmRoles(); + Notifications.success("Scope mappings updated."); + + }); }; $scope.addApplicationRole = function() { $http.post(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/applications/' + $scope.targetApp.name, - $scope.selectedApplicationRoles).success(updateAppRoles); + $scope.selectedApplicationRoles).success(function () { + updateAppRoles(); + Notifications.success("Scope mappings updated."); + + }); }; $scope.deleteApplicationRole = function() { $http.delete(authUrl + '/admin/realms/' + realm.realm + '/oauth-clients/' + oauth.name + '/scope-mappings/applications/' + $scope.targetApp.name, - {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(updateAppRoles); + {data : $scope.selectedApplicationMappings, headers : {"content-type" : "application/json"}}).success(function () { + updateAppRoles(); + Notifications.success("Scope mappings updated."); + + }); }; updateRealmRoles(); diff --git a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/users.js b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/users.js index c4f7375dcd..80634cf0a2 100755 --- a/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/users.js +++ b/forms/common-themes/src/main/resources/theme/admin/base/resources/js/controllers/users.js @@ -1,4 +1,4 @@ -module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, applications, RealmRoleMapping, +module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, applications, Notifications, RealmRoleMapping, ApplicationRoleMapping, AvailableRealmRoleMapping, AvailableApplicationRoleMapping, CompositeRealmRoleMapping, CompositeApplicationRoleMapping) { $scope.realm = realm; @@ -34,6 +34,8 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ap $scope.selectedApplicationRoles = []; $scope.selectedApplicationMappings = []; } + Notifications.success("Role mappings updated."); + }); }; @@ -53,6 +55,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ap $scope.selectedApplicationRoles = []; $scope.selectedApplicationMappings = []; } + Notifications.success("Role mappings updated."); }); }; @@ -64,6 +67,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ap $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.name}); $scope.selectedApplicationRoles = []; $scope.selectedApplicationMappings = []; + Notifications.success("Role mappings updated."); }); }; @@ -75,6 +79,7 @@ module.controller('UserRoleMappingCtrl', function($scope, $http, realm, user, ap $scope.applicationComposite = CompositeApplicationRoleMapping.query({realm : realm.realm, userId : user.username, application : $scope.application.name}); $scope.selectedApplicationRoles = []; $scope.selectedApplicationMappings = []; + Notifications.success("Role mappings updated."); }); };