From be62d1a91516517ce1da0006e12fb705126cabb9 Mon Sep 17 00:00:00 2001 From: Andres Galante Date: Thu, 2 Jul 2015 16:45:48 -0300 Subject: [PATCH 01/14] styles new menu --- .../base/admin/resources/partials/menu.html | 4 + .../admin/resources/templates/kc-menu.html | 40 +++- .../keycloak/admin/resources/css/styles.css | 135 +++++++++++- .../admin/resources/img/keyclok-logo.svg | 194 ++++++++++++++++++ 4 files changed, 363 insertions(+), 10 deletions(-) create mode 100644 forms/common-themes/src/main/resources/theme/keycloak/admin/resources/img/keyclok-logo.svg diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html index 8c59d131c3..1090d33bd0 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html @@ -23,6 +23,8 @@ + \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html index a9316470b2..53331dfbb3 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html @@ -1,4 +1,26 @@ diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-role-list.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-role-list.html index c9ec943773..8a236f70c1 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-role-list.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-role-list.html @@ -14,7 +14,7 @@
- Add Role + Add Role
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-sessions.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-sessions.html index 2b445e149d..61af04cc88 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-sessions.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/client-sessions.html @@ -25,7 +25,7 @@
- Show Sessions + Show Sessions
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html index 57996c8dd9..1598ea5137 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events-admin.html @@ -28,8 +28,8 @@ Filter - - + +
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html index 406f312e8f..4df17ba54b 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-events.html @@ -26,8 +26,8 @@ Filter - - + +
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/role-list.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/role-list.html index 0c44d31856..6689b5638d 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/role-list.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/role-list.html @@ -21,7 +21,7 @@
diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/session-realm.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/session-realm.html index 8b62f1a859..2d71f9c2f8 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/session-realm.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/session-realm.html @@ -11,7 +11,7 @@ diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-list.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-list.html index a846fe8b5b..cb90423592 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-list.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-list.html @@ -15,10 +15,10 @@ - + diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-sessions.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-sessions.html index 685549db41..9d911c5ab9 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-sessions.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/user-sessions.html @@ -11,9 +11,9 @@ - From c8c0d0e80431bfcffc23df394d3032f2f740de8c Mon Sep 17 00:00:00 2001 From: Gregor Tudan Date: Tue, 14 Jul 2015 08:22:08 +0200 Subject: [PATCH 09/14] KEYCLOAK-1564: Add CORS-Headers to token requests by password credentials --- .../org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java index bdcbf7369d..eea4c1d702 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenEndpoint.java @@ -356,7 +356,7 @@ public class TokenEndpoint { event.success(); - return Response.ok(res, MediaType.APPLICATION_JSON_TYPE).build(); + return Cors.add(request, Response.ok(res, MediaType.APPLICATION_JSON_TYPE)).auth().allowedOrigins(client).allowedMethods("POST").exposedHeaders(Cors.ACCESS_CONTROL_ALLOW_METHODS).build(); } } \ No newline at end of file From 32b89adc04203c6ab01dcc012a3d8b171c1d6c38 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 14 Jul 2015 11:19:44 +0200 Subject: [PATCH 10/14] Wire up new menu --- .../theme/base/admin/resources/js/services.js | 13 +++--- .../base/admin/resources/partials/menu.html | 34 --------------- .../resources/partials/realm-create.html | 4 +- .../admin/resources/partials/realm-list.html | 8 +++- .../admin/resources/templates/kc-menu.html | 43 ++++++------------- .../keycloak/admin/resources/css/styles.css | 4 +- .../theme/keycloak/admin/theme.properties | 2 +- 7 files changed, 34 insertions(+), 74 deletions(-) diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js index 0398bfa63c..5e9fefda63 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/js/services.js @@ -884,21 +884,22 @@ module.factory('ClientOrigins', function($resource) { }); module.factory('Current', function(Realm, $route, $rootScope) { - var current = {}; - - current.realms = {}; - current.realm = null; + var current = { + realms: {}, + realm: null + }; $rootScope.$on('$routeChangeStart', function() { - current.realm = null; current.realms = Realm.query(null, function(realms) { + var currentRealm = null; if ($route.current.params.realm) { for (var i = 0; i < realms.length; i++) { if (realms[i].realm == $route.current.params.realm) { - current.realm = realms[i]; + currentRealm = realms[i]; } } } + current.realm = currentRealm; }); }); diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html index 1090d33bd0..c85e83e7ba 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/menu.html @@ -22,38 +22,4 @@ - - \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html index a8cad68154..687ea8e14f 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-create.html @@ -1,4 +1,4 @@ -
+

Add Realm

@@ -49,3 +49,5 @@
+ + \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html index b0df8f3a2b..da0a1fb4f1 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/partials/realm-list.html @@ -1,4 +1,5 @@ -
+
+

Realms

+
@@ -13,4 +14,7 @@
- \ No newline at end of file + + + + \ No newline at end of file diff --git a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html index 985b86cecb..6d937a4bbe 100755 --- a/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html +++ b/forms/common-themes/src/main/resources/theme/base/admin/resources/templates/kc-menu.html @@ -1,32 +1,22 @@ -