keycloak-scim/src/clients/credentials/X509.tsx
Erik Jan de Wit 2393b40c9b
Added the credentials tab (#196)
* initial version credentials tab

* added signed jwt

* submit token endpoint  signing alg

* added x509

* show tab when public client

* fixed test default confimnation dailog size is small

* pr review comments
2020-11-02 15:15:09 -05:00

33 lines
812 B
TypeScript

import React from "react";
import { useTranslation } from "react-i18next";
import { UseFormMethods } from "react-hook-form";
import { FormGroup, TextInput } from "@patternfly/react-core";
import { HelpItem } from "../../components/help-enabler/HelpItem";
export type X509Props = {
form: UseFormMethods;
};
export const X509 = ({ form }: X509Props) => {
const { t } = useTranslation("clients");
return (
<FormGroup
label={t("subject")}
fieldId="kc-subject"
labelIcon={
<HelpItem
helpText="clients-help:subject"
forLabel={t("subject")}
forID="kc-subject"
/>
}
>
<TextInput
ref={form.register()}
type="text"
id="kc-subject"
name="attributes.x509_subjectdn"
/>
</FormGroup>
);
};