2021-02-28 20:02:31 +00:00
|
|
|
import React from "react";
|
|
|
|
import { useTranslation } from "react-i18next";
|
2021-05-04 17:58:18 +00:00
|
|
|
import type { Control } from "react-hook-form";
|
2021-02-28 20:02:31 +00:00
|
|
|
import {
|
|
|
|
ActionGroup,
|
|
|
|
Button,
|
|
|
|
FormGroup,
|
|
|
|
TextInput,
|
|
|
|
} from "@patternfly/react-core";
|
|
|
|
|
|
|
|
import { FormAccess } from "../../components/form-access/FormAccess";
|
|
|
|
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
|
|
|
|
|
|
|
type FineGrainSamlEndpointConfigProps = {
|
|
|
|
control: Control<Record<string, any>>;
|
|
|
|
save: () => void;
|
|
|
|
reset: () => void;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const FineGrainSamlEndpointConfig = ({
|
|
|
|
control: { register },
|
|
|
|
save,
|
|
|
|
reset,
|
|
|
|
}: FineGrainSamlEndpointConfigProps) => {
|
|
|
|
const { t } = useTranslation("clients");
|
|
|
|
return (
|
|
|
|
<FormAccess role="manage-realm" isHorizontal>
|
|
|
|
<FormGroup
|
|
|
|
label={t("assertionConsumerServicePostBindingURL")}
|
|
|
|
fieldId="assertionConsumerServicePostBindingURL"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:assertionConsumerServicePostBindingURL"
|
|
|
|
forLabel={t("assertionConsumerServicePostBindingURL")}
|
|
|
|
forID="assertionConsumerServicePostBindingURL"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="assertionConsumerServicePostBindingURL"
|
|
|
|
name="attributes.saml_assertion_consumer_url_post"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("assertionConsumerServiceRedirectBindingURL")}
|
|
|
|
fieldId="assertionConsumerServiceRedirectBindingURL"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:assertionConsumerServiceRedirectBindingURL"
|
|
|
|
forLabel={t("assertionConsumerServiceRedirectBindingURL")}
|
|
|
|
forID="assertionConsumerServiceRedirectBindingURL"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="assertionConsumerServiceRedirectBindingURL"
|
|
|
|
name="attributes.saml_assertion_consumer_url_redirect"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("logoutServicePostBindingURL")}
|
|
|
|
fieldId="logoutServicePostBindingURL"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:logoutServicePostBindingURL"
|
|
|
|
forLabel={t("logoutServicePostBindingURL")}
|
|
|
|
forID="logoutServicePostBindingURL"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="logoutServicePostBindingURL"
|
|
|
|
name="attributes.saml_single_logout_service_url_post"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("logoutServiceRedirectBindingURL")}
|
|
|
|
fieldId="logoutServiceRedirectBindingURL"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:logoutServiceRedirectBindingURL"
|
|
|
|
forLabel={t("logoutServiceRedirectBindingURL")}
|
|
|
|
forID="logoutServiceRedirectBindingURL"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="logoutServiceRedirectBindingURL"
|
|
|
|
name="attributes.saml_single_logout_service_url_redirect"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
2021-10-12 22:15:19 +00:00
|
|
|
<FormGroup
|
|
|
|
label={t("logoutServiceArtifactBindingUrl")}
|
|
|
|
fieldId="logoutServiceArtifactBindingUrl"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:logoutServiceArtifactBindingUrl"
|
|
|
|
forLabel={t("logoutServiceArtifactBindingUrl")}
|
|
|
|
forID="logoutServiceArtifactBindingUrl"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="logoutServiceArtifactBindingUrl"
|
|
|
|
name="attributes.saml_single_logout_service_url_redirect"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("artifactBindingUrl")}
|
|
|
|
fieldId="artifactBindingUrl"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:artifactBindingUrl"
|
|
|
|
forLabel={t("artifactBindingUrl")}
|
|
|
|
forID="artifactBindingUrl"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="artifactBindingUrl"
|
|
|
|
name="attributes.saml_artifact_binding_url"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("artifactResolutionService")}
|
|
|
|
fieldId="artifactResolutionService"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:artifactResolutionService"
|
|
|
|
forLabel={t("artifactResolutionService")}
|
|
|
|
forID="artifactResolutionService"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
ref={register()}
|
|
|
|
type="text"
|
|
|
|
id="artifactResolutionService"
|
|
|
|
name="attributes.saml_artifact_resolution_service_url"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
2021-02-28 20:02:31 +00:00
|
|
|
|
|
|
|
<ActionGroup>
|
|
|
|
<Button variant="tertiary" onClick={save}>
|
|
|
|
{t("common:save")}
|
|
|
|
</Button>
|
|
|
|
<Button variant="link" onClick={reset}>
|
2021-03-12 16:30:14 +00:00
|
|
|
{t("common:revert")}
|
2021-02-28 20:02:31 +00:00
|
|
|
</Button>
|
|
|
|
</ActionGroup>
|
|
|
|
</FormAccess>
|
|
|
|
);
|
|
|
|
};
|