UNPKG

@keycloakify/keycloak-admin-ui

Version:
17 lines 1.88 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useTranslation } from "react-i18next"; import { SelectControl } from "../../ui-shared"; import { DefaultSwitchControl } from "../../components/SwitchControl"; import { FormAccess } from "../../components/form/FormAccess"; import { convertAttributeNameToForm } from "../../util"; export const Toggle = ({ name, label }) => { const { t } = useTranslation(); return (_jsx(DefaultSwitchControl, { name: name, label: t(label), labelIcon: t(`${label}Help`), stringify: true })); }; export const SamlConfig = () => { const { t } = useTranslation(); return (_jsxs(FormAccess, { isHorizontal: true, role: "manage-clients", className: "keycloak__capability-config__form", children: [_jsx(SelectControl, { name: "attributes.saml_name_id_format", label: t("nameIdFormat"), labelIcon: t("nameIdFormatHelp"), controller: { defaultValue: "username", }, options: ["username", "email", "transient", "persistent"] }), _jsx(Toggle, { name: "attributes.saml_force_name_id_format", label: "forceNameIdFormat" }), _jsx(Toggle, { name: convertAttributeNameToForm("attributes.saml.force.post.binding"), label: "forcePostBinding" }), _jsx(Toggle, { name: convertAttributeNameToForm("attributes.saml.artifact.binding"), label: "forceArtifactBinding" }), _jsx(Toggle, { name: convertAttributeNameToForm("attributes.saml.authnstatement"), label: "includeAuthnStatement" }), _jsx(Toggle, { name: convertAttributeNameToForm("attributes.saml.onetimeuse.condition"), label: "includeOneTimeUseCondition" }), _jsx(Toggle, { name: convertAttributeNameToForm("attributes.saml.server.signature.keyinfo.ext"), label: "optimizeLookup" }), _jsx(Toggle, { name: convertAttributeNameToForm("attributes.saml.allow.ecp.flow"), label: "allowEcpFlow" })] })); }; //# sourceMappingURL=SamlConfig.js.map