From 03c07bd2d77cc5e6297059632d0ffe3bbcbefc67 Mon Sep 17 00:00:00 2001 From: Luca Leonardo Scorcia Date: Mon, 27 Jul 2020 09:48:01 -0400 Subject: [PATCH] KEYCLOAK-14902 Replace SAML SP metadata export with link to descriptor --- .../messages/admin-messages_en.properties | 2 ++ .../admin/resources/js/controllers/realm.js | 24 ------------------- .../realm-identity-provider-export.html | 23 ------------------ .../realm-identity-provider-saml.html | 7 ++++++ .../templates/kc-tabs-identity-provider.html | 1 - 5 files changed, 9 insertions(+), 48 deletions(-) delete mode 100755 themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-export.html diff --git a/themes/src/main/resources/theme/base/admin/messages/admin-messages_en.properties b/themes/src/main/resources/theme/base/admin/messages/admin-messages_en.properties index aa32399bc5..ed65e8ddb5 100644 --- a/themes/src/main/resources/theme/base/admin/messages/admin-messages_en.properties +++ b/themes/src/main/resources/theme/base/admin/messages/admin-messages_en.properties @@ -664,6 +664,8 @@ import-from-url=Import from URL identity-provider.import-from-url.tooltip=Import metadata from a remote IDP discovery descriptor. import-from-file=Import from file identity-provider.import-from-file.tooltip=Import metadata from a downloaded IDP discovery descriptor. +identity-provider.saml.protocol-endpoints.saml=SAML 2.0 Service Provider Metadata +identity-provider.saml.protocol-endpoints.saml.tooltip=Shows the configuration of the Service Provider endpoint saml-config=SAML Config identity-provider.saml-config.tooltip=SAML SP and external IDP configuration. single-signon-service-url=Single Sign-On Service URL diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js index 03e750970b..d7f3fbbfbc 100644 --- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js @@ -1122,30 +1122,6 @@ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload }); -module.controller('RealmIdentityProviderExportCtrl', function(realm, identityProvider, $scope, $http, IdentityProviderExport) { - $scope.realm = realm; - $scope.identityProvider = identityProvider; - $scope.download = null; - $scope.exported = ""; - $scope.exportedType = ""; - - var url = IdentityProviderExport.url({realm: realm.realm, alias: identityProvider.alias}) ; - $http.get(url).then(function(response) { - $scope.exportedType = response.headers('Content-Type'); - $scope.exported = response.data; - }); - - $scope.download = function() { - var suffix = "txt"; - if ($scope.exportedType == 'application/xml') { - suffix = 'xml'; - } else if ($scope.exportedType == 'application/json') { - suffix = 'json'; - } - saveAs(new Blob([$scope.exported], { type: $scope.exportedType }), 'keycloak.' + suffix); - } -}); - module.controller('RealmTokenDetailCtrl', function($scope, Realm, realm, $http, $location, $route, Dialog, Notifications, TimeUnit, TimeUnit2, serverInfo) { $scope.realm = realm; $scope.serverInfo = serverInfo; diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-export.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-export.html deleted file mode 100755 index 742cdf4882..0000000000 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-export.html +++ /dev/null @@ -1,23 +0,0 @@ -
- - - - -
-
-
-
- {{:: 'download' | translate}} - -
-
-
-
-
- - \ No newline at end of file diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-saml.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-saml.html index 22ac32a153..101c3bc192 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-saml.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-saml.html @@ -122,6 +122,13 @@ {{:: 'sync-mode.tooltip' | translate}} +
+ + + {{:: 'identity-provider.saml.protocol-endpoints.saml.tooltip' | translate}} +
{{:: 'saml-config' | translate}} {{:: 'identity-provider.saml-config.tooltip' | translate}} diff --git a/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-identity-provider.html b/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-identity-provider.html index e063e9ca57..94b2604474 100644 --- a/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-identity-provider.html +++ b/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-identity-provider.html @@ -11,7 +11,6 @@