@keycloakify/keycloak-admin-ui
Version:
Repackaged Keycloak Admin UI
20 lines • 1.29 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { useTranslation } from "react-i18next";
import { SelectControl } from "../../ui-shared";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { convertAttributeNameToForm } from "../../util";
export const SignedJWT = ({ clientAuthenticatorType }) => {
var _a, _b;
const { cryptoInfo } = useServerInfo();
const providers = clientAuthenticatorType === "client-jwt"
? ((_a = cryptoInfo === null || cryptoInfo === void 0 ? void 0 : cryptoInfo.clientSignatureAsymmetricAlgorithms) !== null && _a !== void 0 ? _a : [])
: ((_b = cryptoInfo === null || cryptoInfo === void 0 ? void 0 : cryptoInfo.clientSignatureSymmetricAlgorithms) !== null && _b !== void 0 ? _b : []);
const { t } = useTranslation();
return (_jsx(SelectControl, { name: convertAttributeNameToForm("attributes.token.endpoint.auth.signing.alg"), label: t("signatureAlgorithm"), labelIcon: t("signatureAlgorithmHelp"), controller: {
defaultValue: "",
}, isScrollable: true, maxMenuHeight: "200px", options: [
{ key: "", value: t("anyAlgorithm") },
...providers.map((option) => ({ key: option, value: option })),
] }));
};
//# sourceMappingURL=SignedJWT.js.map