From c6b8c70ebb6721149ae376dfc9b5d6cb1b200a02 Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Wed, 20 Sep 2023 14:53:57 -0400 Subject: [PATCH] Call correct SAML key download API Backports #23251 --- js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx | 5 ++++- js/apps/admin-ui/src/clients/keys/SamlKeys.tsx | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx b/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx index 95456dd169de..71ab1291f546 100644 --- a/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx +++ b/js/apps/admin-ui/src/clients/keys/ExportSamlKeyDialog.tsx @@ -8,15 +8,18 @@ import { adminClient } from "../../admin-client"; import { useAlerts } from "../../components/alert/Alerts"; import { useRealm } from "../../context/realm-context/RealmContext"; import { KeyForm, getFileExtension } from "./GenerateKeyDialog"; +import { KeyTypes } from "./SamlKeys"; type ExportSamlKeyDialogProps = { clientId: string; close: () => void; + keyType: KeyTypes; }; export const ExportSamlKeyDialog = ({ clientId, close, + keyType, }: ExportSamlKeyDialogProps) => { const { t } = useTranslation("clients"); const { realm } = useRealm(); @@ -32,7 +35,7 @@ export const ExportSamlKeyDialog = ({ const keyStore = await adminClient.clients.downloadKey( { id: clientId, - attr: "saml.signing", + attr: keyType, }, config, ); diff --git a/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx b/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx index e8c018769466..9aba7b5b14d1 100644 --- a/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx +++ b/js/apps/admin-ui/src/clients/keys/SamlKeys.tsx @@ -82,7 +82,11 @@ const KeySection = ({ return ( <> {showImportDialog && ( - + )}