Call correct SAML key download API (#23375)
This commit is contained in:
parent
b5a2b99874
commit
2463c6291d
2 changed files with 9 additions and 2 deletions
|
@ -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();
|
||||
const { realm } = useRealm();
|
||||
|
@ -32,7 +35,7 @@ export const ExportSamlKeyDialog = ({
|
|||
const keyStore = await adminClient.clients.downloadKey(
|
||||
{
|
||||
id: clientId,
|
||||
attr: "saml.signing",
|
||||
attr: keyType,
|
||||
},
|
||||
config,
|
||||
);
|
||||
|
|
|
@ -82,7 +82,11 @@ const KeySection = ({
|
|||
return (
|
||||
<>
|
||||
{showImportDialog && (
|
||||
<ExportSamlKeyDialog clientId={clientId} close={toggleImportDialog} />
|
||||
<ExportSamlKeyDialog
|
||||
keyType={attr}
|
||||
clientId={clientId}
|
||||
close={toggleImportDialog}
|
||||
/>
|
||||
)}
|
||||
<FormPanel title={t(title)} className="kc-form-panel__panel">
|
||||
<TextContent className="pf-u-pb-lg">
|
||||
|
|
Loading…
Reference in a new issue