2021-02-28 20:02:31 +00:00
|
|
|
import {
|
|
|
|
ActionGroup,
|
|
|
|
AlertVariant,
|
|
|
|
Button,
|
|
|
|
ButtonVariant,
|
|
|
|
ExpandableSection,
|
|
|
|
FormGroup,
|
2021-09-10 13:25:18 +00:00
|
|
|
InputGroup,
|
2021-04-01 14:14:19 +00:00
|
|
|
PageSection,
|
2021-02-28 20:02:31 +00:00
|
|
|
Split,
|
|
|
|
SplitItem,
|
|
|
|
Text,
|
|
|
|
ToolbarItem,
|
2021-09-10 13:25:18 +00:00
|
|
|
Tooltip,
|
2021-02-28 20:02:31 +00:00
|
|
|
} from "@patternfly/react-core";
|
2021-08-26 08:39:35 +00:00
|
|
|
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
|
|
|
|
import type GlobalRequestResult from "@keycloak/keycloak-admin-client/lib/defs/globalRequestResult";
|
2021-07-21 15:08:40 +00:00
|
|
|
import moment from "moment";
|
2021-09-10 13:25:18 +00:00
|
|
|
import React, { useEffect, useRef, useState } from "react";
|
2021-07-21 15:08:40 +00:00
|
|
|
import { Controller, useFormContext } from "react-hook-form";
|
|
|
|
import { Trans, useTranslation } from "react-i18next";
|
|
|
|
import { Link } from "react-router-dom";
|
|
|
|
import { useAlerts } from "../components/alert/Alerts";
|
|
|
|
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
2021-02-28 20:02:31 +00:00
|
|
|
import { FormAccess } from "../components/form-access/FormAccess";
|
|
|
|
import { HelpItem } from "../components/help-enabler/HelpItem";
|
2021-07-21 15:08:40 +00:00
|
|
|
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
|
|
|
|
import { ScrollForm } from "../components/scroll-form/ScrollForm";
|
2021-02-28 20:02:31 +00:00
|
|
|
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
|
|
|
|
import { TimeSelector } from "../components/time-selector/TimeSelector";
|
2022-04-21 15:03:26 +00:00
|
|
|
import { KeycloakTextInput } from "../components/keycloak-text-input/KeycloakTextInput";
|
2021-02-28 20:02:31 +00:00
|
|
|
import { useAdminClient } from "../context/auth/AdminClient";
|
2021-07-21 15:08:40 +00:00
|
|
|
import { useRealm } from "../context/realm-context/RealmContext";
|
|
|
|
import { convertToFormValues, toUpperCase } from "../util";
|
2021-02-28 20:02:31 +00:00
|
|
|
import { AddHostDialog } from "./advanced/AddHostDialog";
|
2021-07-21 15:08:40 +00:00
|
|
|
import { AdvancedSettings } from "./advanced/AdvancedSettings";
|
2021-02-28 20:02:31 +00:00
|
|
|
import { AuthenticationOverrides } from "./advanced/AuthenticationOverrides";
|
2021-07-21 15:08:40 +00:00
|
|
|
import { FineGrainOpenIdConnect } from "./advanced/FineGrainOpenIdConnect";
|
|
|
|
import { FineGrainSamlEndpointConfig } from "./advanced/FineGrainSamlEndpointConfig";
|
|
|
|
import { OpenIdConnectCompatibilityModes } from "./advanced/OpenIdConnectCompatibilityModes";
|
2021-05-04 17:58:18 +00:00
|
|
|
import type { SaveOptions } from "./ClientDetails";
|
2021-07-21 15:08:40 +00:00
|
|
|
import { toClient } from "./routes/Client";
|
2021-02-28 20:02:31 +00:00
|
|
|
|
|
|
|
type AdvancedProps = {
|
2021-03-17 13:40:19 +00:00
|
|
|
save: (options?: SaveOptions) => void;
|
2021-02-28 20:02:31 +00:00
|
|
|
client: ClientRepresentation;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const AdvancedTab = ({
|
|
|
|
save,
|
|
|
|
client: {
|
|
|
|
id,
|
2022-03-07 14:28:26 +00:00
|
|
|
publicClient,
|
2021-02-28 20:02:31 +00:00
|
|
|
registeredNodes,
|
|
|
|
attributes,
|
|
|
|
protocol,
|
|
|
|
authenticationFlowBindingOverrides,
|
2021-09-10 13:25:18 +00:00
|
|
|
adminUrl,
|
2022-05-30 09:23:24 +00:00
|
|
|
access,
|
2021-02-28 20:02:31 +00:00
|
|
|
},
|
|
|
|
}: AdvancedProps) => {
|
|
|
|
const { t } = useTranslation("clients");
|
|
|
|
const adminClient = useAdminClient();
|
|
|
|
const { realm } = useRealm();
|
2021-07-28 12:01:42 +00:00
|
|
|
const { addAlert, addError } = useAlerts();
|
2021-02-28 20:02:31 +00:00
|
|
|
const revocationFieldName = "notBefore";
|
|
|
|
const openIdConnect = "openid-connect";
|
|
|
|
|
|
|
|
const { getValues, setValue, register, control, reset } = useFormContext();
|
|
|
|
const [expanded, setExpanded] = useState(false);
|
|
|
|
const [selectedNode, setSelectedNode] = useState("");
|
|
|
|
const [addNodeOpen, setAddNodeOpen] = useState(false);
|
|
|
|
const [key, setKey] = useState(0);
|
|
|
|
const refresh = () => setKey(new Date().getTime());
|
|
|
|
const [nodes, setNodes] = useState(registeredNodes || {});
|
2021-09-10 13:25:18 +00:00
|
|
|
const pushRevocationButtonRef = useRef<HTMLElement>();
|
2021-02-28 20:02:31 +00:00
|
|
|
|
2021-03-17 13:40:19 +00:00
|
|
|
const setNotBefore = (time: number, messageKey: string) => {
|
2021-02-28 20:02:31 +00:00
|
|
|
setValue(revocationFieldName, time);
|
2021-03-17 13:40:19 +00:00
|
|
|
save({ messageKey });
|
2021-02-28 20:02:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const parseResult = (result: GlobalRequestResult, prefixKey: string) => {
|
|
|
|
const successCount = result.successRequests?.length || 0;
|
|
|
|
const failedCount = result.failedRequests?.length || 0;
|
|
|
|
|
|
|
|
if (successCount === 0 && failedCount === 0) {
|
|
|
|
addAlert(t("noAdminUrlSet"), AlertVariant.warning);
|
|
|
|
} else if (failedCount > 0) {
|
|
|
|
addAlert(
|
|
|
|
t(prefixKey + "Success", { successNodes: result.successRequests }),
|
|
|
|
AlertVariant.success
|
|
|
|
);
|
|
|
|
addAlert(
|
|
|
|
t(prefixKey + "Fail", { failedNodes: result.failedRequests }),
|
|
|
|
AlertVariant.danger
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
addAlert(
|
|
|
|
t(prefixKey + "Success", { successNodes: result.successRequests }),
|
|
|
|
AlertVariant.success
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const resetFields = (names: string[]) => {
|
|
|
|
const values: { [name: string]: string } = {};
|
|
|
|
for (const name of names) {
|
2021-12-08 15:08:42 +00:00
|
|
|
values[`attributes.${name}`] = attributes?.[name];
|
2021-02-28 20:02:31 +00:00
|
|
|
}
|
|
|
|
reset(values);
|
|
|
|
};
|
|
|
|
|
|
|
|
const push = async () => {
|
2022-02-08 13:57:04 +00:00
|
|
|
const result = await adminClient.clients.pushRevocation({
|
2021-02-28 20:02:31 +00:00
|
|
|
id: id!,
|
2022-02-08 13:57:04 +00:00
|
|
|
});
|
2021-02-28 20:02:31 +00:00
|
|
|
parseResult(result, "notBeforePush");
|
|
|
|
};
|
|
|
|
|
|
|
|
const testCluster = async () => {
|
|
|
|
const result = await adminClient.clients.testNodesAvailable({ id: id! });
|
|
|
|
parseResult(result, "testCluster");
|
|
|
|
};
|
|
|
|
|
|
|
|
const [toggleDeleteNodeConfirm, DeleteNodeConfirm] = useConfirmDialog({
|
|
|
|
titleKey: "clients:deleteNode",
|
|
|
|
messageKey: t("deleteNodeBody", {
|
|
|
|
node: selectedNode,
|
|
|
|
}),
|
|
|
|
continueButtonLabel: "common:delete",
|
|
|
|
continueButtonVariant: ButtonVariant.danger,
|
|
|
|
onConfirm: async () => {
|
|
|
|
try {
|
|
|
|
await adminClient.clients.deleteClusterNode({
|
|
|
|
id: id!,
|
|
|
|
node: selectedNode,
|
|
|
|
});
|
|
|
|
setNodes({
|
|
|
|
...Object.keys(nodes).reduce((object: any, key) => {
|
|
|
|
if (key !== selectedNode) {
|
|
|
|
object[key] = nodes[key];
|
|
|
|
}
|
|
|
|
return object;
|
|
|
|
}, {}),
|
|
|
|
});
|
|
|
|
refresh();
|
|
|
|
addAlert(t("deleteNodeSuccess"), AlertVariant.success);
|
|
|
|
} catch (error) {
|
2021-07-28 12:01:42 +00:00
|
|
|
addError("clients:deleteNodeFail", error);
|
2021-02-28 20:02:31 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
register(revocationFieldName);
|
|
|
|
}, [register]);
|
|
|
|
|
|
|
|
const formatDate = () => {
|
|
|
|
const date = getValues(revocationFieldName);
|
|
|
|
if (date > 0) {
|
|
|
|
return moment(date * 1000).format("LLL");
|
|
|
|
} else {
|
2021-06-14 11:31:45 +00:00
|
|
|
return t("common:none");
|
2021-02-28 20:02:31 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const sections = [
|
|
|
|
t("revocation"),
|
|
|
|
t("clustering"),
|
|
|
|
protocol === openIdConnect
|
|
|
|
? t("fineGrainOpenIdConnectConfiguration")
|
|
|
|
: t("fineGrainSamlEndpointConfig"),
|
|
|
|
t("advancedSettings"),
|
|
|
|
t("authenticationOverrides"),
|
|
|
|
];
|
|
|
|
if (protocol === openIdConnect) {
|
|
|
|
sections.splice(3, 0, t("openIdConnectCompatibilityModes"));
|
|
|
|
}
|
2022-03-07 14:28:26 +00:00
|
|
|
if (!publicClient) {
|
|
|
|
sections.splice(1, 1);
|
|
|
|
}
|
2022-03-08 09:53:25 +00:00
|
|
|
if (protocol !== openIdConnect) {
|
|
|
|
sections.splice(0, 1);
|
|
|
|
}
|
2021-02-28 20:02:31 +00:00
|
|
|
|
|
|
|
return (
|
2021-04-20 19:46:07 +00:00
|
|
|
<PageSection variant="light" className="pf-u-py-0">
|
2021-04-28 05:50:17 +00:00
|
|
|
<ScrollForm sections={sections} borders>
|
2022-03-08 09:53:25 +00:00
|
|
|
{protocol === openIdConnect && (
|
|
|
|
<>
|
|
|
|
<Text className="pf-u-pb-lg">
|
|
|
|
<Trans i18nKey="clients-help:notBeforeIntro">
|
|
|
|
In order to successfully push setup url on
|
|
|
|
<Link to={toClient({ realm, clientId: id!, tab: "settings" })}>
|
|
|
|
{t("settings")}
|
|
|
|
</Link>
|
|
|
|
tab
|
|
|
|
</Trans>
|
|
|
|
</Text>
|
2022-05-30 09:23:24 +00:00
|
|
|
<FormAccess
|
|
|
|
role="manage-clients"
|
|
|
|
fineGrainedAccess={access?.configure}
|
|
|
|
isHorizontal
|
|
|
|
>
|
2022-03-08 09:53:25 +00:00
|
|
|
<FormGroup
|
|
|
|
label={t("notBefore")}
|
|
|
|
fieldId="kc-not-before"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:notBefore"
|
|
|
|
fieldLabelId="clients:notBefore"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<InputGroup>
|
2022-04-21 15:03:26 +00:00
|
|
|
<KeycloakTextInput
|
2022-03-08 09:53:25 +00:00
|
|
|
type="text"
|
|
|
|
id="kc-not-before"
|
|
|
|
name="notBefore"
|
|
|
|
isReadOnly
|
|
|
|
value={formatDate()}
|
|
|
|
/>
|
|
|
|
<Button
|
|
|
|
id="setToNow"
|
|
|
|
variant="control"
|
|
|
|
onClick={() => {
|
|
|
|
setNotBefore(moment.now() / 1000, "notBeforeSetToNow");
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{t("setToNow")}
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
id="clear"
|
|
|
|
variant="control"
|
|
|
|
onClick={() => {
|
|
|
|
setNotBefore(0, "notBeforeNowClear");
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{t("clear")}
|
|
|
|
</Button>
|
|
|
|
</InputGroup>
|
|
|
|
</FormGroup>
|
|
|
|
<ActionGroup>
|
|
|
|
{!adminUrl && (
|
|
|
|
<Tooltip
|
|
|
|
reference={pushRevocationButtonRef}
|
|
|
|
content={t("clients-help:notBeforeTooltip")}
|
|
|
|
/>
|
|
|
|
)}
|
2021-09-10 13:25:18 +00:00
|
|
|
<Button
|
2022-03-08 09:53:25 +00:00
|
|
|
id="push"
|
|
|
|
variant="secondary"
|
|
|
|
onClick={push}
|
|
|
|
isAriaDisabled={!adminUrl}
|
|
|
|
ref={pushRevocationButtonRef}
|
2021-09-10 13:25:18 +00:00
|
|
|
>
|
2022-03-08 09:53:25 +00:00
|
|
|
{t("push")}
|
2021-09-10 13:25:18 +00:00
|
|
|
</Button>
|
2022-03-08 09:53:25 +00:00
|
|
|
</ActionGroup>
|
|
|
|
</FormAccess>
|
|
|
|
</>
|
|
|
|
)}
|
2022-03-07 14:28:26 +00:00
|
|
|
{publicClient && (
|
2021-04-01 14:14:19 +00:00
|
|
|
<>
|
2022-05-30 09:23:24 +00:00
|
|
|
<FormAccess
|
|
|
|
role="manage-clients"
|
|
|
|
fineGrainedAccess={access?.configure}
|
|
|
|
isHorizontal
|
|
|
|
>
|
2022-03-07 14:28:26 +00:00
|
|
|
<FormGroup
|
|
|
|
label={t("nodeReRegistrationTimeout")}
|
|
|
|
fieldId="kc-node-reregistration-timeout"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:nodeReRegistrationTimeout"
|
|
|
|
fieldLabelId="clients:nodeReRegistrationTimeout"
|
2021-06-16 11:35:03 +00:00
|
|
|
/>
|
|
|
|
}
|
2022-03-07 14:28:26 +00:00
|
|
|
>
|
|
|
|
<Split hasGutter>
|
|
|
|
<SplitItem>
|
|
|
|
<Controller
|
|
|
|
name="nodeReRegistrationTimeout"
|
|
|
|
defaultValue=""
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<TimeSelector value={value} onChange={onChange} />
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</SplitItem>
|
|
|
|
<SplitItem>
|
|
|
|
<Button
|
|
|
|
variant={ButtonVariant.secondary}
|
|
|
|
onClick={() => save()}
|
|
|
|
>
|
|
|
|
{t("common:save")}
|
|
|
|
</Button>
|
|
|
|
</SplitItem>
|
|
|
|
</Split>
|
|
|
|
</FormGroup>
|
|
|
|
</FormAccess>
|
|
|
|
<>
|
|
|
|
<DeleteNodeConfirm />
|
|
|
|
<AddHostDialog
|
|
|
|
clientId={id!}
|
|
|
|
isOpen={addNodeOpen}
|
|
|
|
onAdded={(node) => {
|
|
|
|
nodes[node] = moment.now() / 1000;
|
|
|
|
refresh();
|
|
|
|
}}
|
|
|
|
onClose={() => setAddNodeOpen(false)}
|
2021-02-28 20:02:31 +00:00
|
|
|
/>
|
2022-03-07 14:28:26 +00:00
|
|
|
<ExpandableSection
|
|
|
|
toggleText={t("registeredClusterNodes")}
|
|
|
|
onToggle={setExpanded}
|
|
|
|
isExpanded={expanded}
|
|
|
|
>
|
|
|
|
<KeycloakDataTable
|
|
|
|
key={key}
|
|
|
|
ariaLabelKey="registeredClusterNodes"
|
|
|
|
loader={() =>
|
|
|
|
Promise.resolve(
|
|
|
|
Object.entries(nodes || {}).map((entry) => {
|
|
|
|
return { host: entry[0], registration: entry[1] };
|
|
|
|
})
|
|
|
|
)
|
|
|
|
}
|
|
|
|
toolbarItem={
|
|
|
|
<>
|
|
|
|
<ToolbarItem>
|
|
|
|
<Button
|
|
|
|
id="testClusterAvailability"
|
|
|
|
onClick={testCluster}
|
|
|
|
variant={ButtonVariant.secondary}
|
|
|
|
isDisabled={Object.keys(nodes).length === 0}
|
|
|
|
>
|
|
|
|
{t("testClusterAvailability")}
|
|
|
|
</Button>
|
|
|
|
</ToolbarItem>
|
|
|
|
<ToolbarItem>
|
|
|
|
<Button
|
|
|
|
id="registerNodeManually"
|
|
|
|
onClick={() => setAddNodeOpen(true)}
|
|
|
|
variant={ButtonVariant.tertiary}
|
|
|
|
>
|
|
|
|
{t("registerNodeManually")}
|
|
|
|
</Button>
|
|
|
|
</ToolbarItem>
|
|
|
|
</>
|
|
|
|
}
|
|
|
|
actions={[
|
|
|
|
{
|
|
|
|
title: t("common:delete"),
|
|
|
|
onRowClick: (node) => {
|
|
|
|
setSelectedNode(node.host);
|
|
|
|
toggleDeleteNodeConfirm();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
columns={[
|
|
|
|
{
|
|
|
|
name: "host",
|
|
|
|
displayKey: "clients:nodeHost",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "registration",
|
|
|
|
displayKey: "clients:lastRegistration",
|
|
|
|
cellFormatters: [
|
|
|
|
(value) =>
|
|
|
|
value
|
|
|
|
? moment(parseInt(value.toString()) * 1000).format(
|
|
|
|
"LLL"
|
|
|
|
)
|
|
|
|
: "",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]}
|
|
|
|
emptyState={
|
|
|
|
<ListEmptyState
|
|
|
|
message={t("noNodes")}
|
|
|
|
instructions={t("noNodesInstructions")}
|
|
|
|
primaryActionText={t("registerNodeManually")}
|
|
|
|
onPrimaryAction={() => setAddNodeOpen(true)}
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</ExpandableSection>
|
|
|
|
</>
|
2021-04-01 14:14:19 +00:00
|
|
|
</>
|
2022-03-07 14:28:26 +00:00
|
|
|
)}
|
2021-03-17 13:40:19 +00:00
|
|
|
<>
|
2021-04-01 14:14:19 +00:00
|
|
|
{protocol === openIdConnect && (
|
|
|
|
<>
|
2021-04-15 08:54:06 +00:00
|
|
|
<Text className="pf-u-pb-lg">
|
2021-04-01 14:14:19 +00:00
|
|
|
{t("clients-help:fineGrainOpenIdConnectConfiguration")}
|
|
|
|
</Text>
|
|
|
|
<FineGrainOpenIdConnect
|
|
|
|
save={() => save()}
|
|
|
|
reset={() =>
|
2021-12-08 15:08:42 +00:00
|
|
|
convertToFormValues(attributes, (key, value) =>
|
|
|
|
setValue(`attributes.${key}`, value)
|
|
|
|
)
|
2021-04-01 14:14:19 +00:00
|
|
|
}
|
2022-05-30 09:23:24 +00:00
|
|
|
hasConfigureAccess={access?.configure}
|
2021-04-01 14:14:19 +00:00
|
|
|
/>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
{protocol !== openIdConnect && (
|
|
|
|
<>
|
2021-04-15 08:54:06 +00:00
|
|
|
<Text className="pf-u-pb-lg">
|
2021-04-01 14:14:19 +00:00
|
|
|
{t("clients-help:fineGrainSamlEndpointConfig")}
|
|
|
|
</Text>
|
|
|
|
<FineGrainSamlEndpointConfig
|
|
|
|
control={control}
|
|
|
|
save={() => save()}
|
|
|
|
reset={() =>
|
2021-12-08 15:08:42 +00:00
|
|
|
convertToFormValues(attributes, (key, value) =>
|
|
|
|
setValue(`attributes.${key}`, value)
|
|
|
|
)
|
2021-04-01 14:14:19 +00:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
)}
|
2021-03-17 13:40:19 +00:00
|
|
|
</>
|
2021-02-28 20:02:31 +00:00
|
|
|
{protocol === openIdConnect && (
|
|
|
|
<>
|
2021-04-15 08:54:06 +00:00
|
|
|
<Text className="pf-u-pb-lg">
|
2021-04-01 14:14:19 +00:00
|
|
|
{t("clients-help:openIdConnectCompatibilityModes")}
|
2021-03-17 13:40:19 +00:00
|
|
|
</Text>
|
2021-04-01 14:14:19 +00:00
|
|
|
<OpenIdConnectCompatibilityModes
|
2021-03-17 13:40:19 +00:00
|
|
|
control={control}
|
|
|
|
save={() => save()}
|
|
|
|
reset={() =>
|
2021-12-08 15:08:42 +00:00
|
|
|
resetFields(["exclude.session.state.from.auth.response"])
|
2021-03-17 13:40:19 +00:00
|
|
|
}
|
2022-05-30 09:23:24 +00:00
|
|
|
hasConfigureAccess={access?.configure}
|
2021-03-17 13:40:19 +00:00
|
|
|
/>
|
2021-02-28 20:02:31 +00:00
|
|
|
</>
|
|
|
|
)}
|
2021-03-17 13:40:19 +00:00
|
|
|
<>
|
2021-04-15 08:54:06 +00:00
|
|
|
<Text className="pf-u-pb-lg">
|
2021-04-13 08:01:21 +00:00
|
|
|
{t("clients-help:advancedSettings" + toUpperCase(protocol || ""))}
|
2021-02-28 20:02:31 +00:00
|
|
|
</Text>
|
2021-04-01 14:14:19 +00:00
|
|
|
<AdvancedSettings
|
|
|
|
protocol={protocol}
|
2021-02-28 20:02:31 +00:00
|
|
|
control={control}
|
2022-05-30 09:23:24 +00:00
|
|
|
hasConfigureAccess={access?.configure}
|
2021-03-17 13:40:19 +00:00
|
|
|
save={() => save()}
|
2021-04-01 14:14:19 +00:00
|
|
|
reset={() => {
|
|
|
|
resetFields([
|
2021-12-08 15:08:42 +00:00
|
|
|
"saml.assertion.lifespan",
|
|
|
|
"access.token.lifespan",
|
|
|
|
"tls.client.certificate.bound.access.tokens",
|
|
|
|
"pkce.code.challenge.method",
|
2021-04-01 14:14:19 +00:00
|
|
|
]);
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
<>
|
2021-04-15 08:54:06 +00:00
|
|
|
<Text className="pf-u-pb-lg">
|
2021-04-01 14:14:19 +00:00
|
|
|
{t("clients-help:authenticationOverrides")}
|
|
|
|
</Text>
|
|
|
|
<AuthenticationOverrides
|
|
|
|
protocol={protocol}
|
|
|
|
control={control}
|
|
|
|
save={() => save()}
|
|
|
|
reset={() => {
|
|
|
|
setValue(
|
|
|
|
"authenticationFlowBindingOverrides.browser",
|
|
|
|
authenticationFlowBindingOverrides?.browser
|
|
|
|
);
|
|
|
|
setValue(
|
|
|
|
"authenticationFlowBindingOverrides.direct_grant",
|
|
|
|
authenticationFlowBindingOverrides?.direct_grant
|
|
|
|
);
|
|
|
|
}}
|
2022-05-30 09:23:24 +00:00
|
|
|
hasConfigureAccess={access?.configure}
|
2021-02-28 20:02:31 +00:00
|
|
|
/>
|
2021-03-17 13:40:19 +00:00
|
|
|
</>
|
2021-04-01 14:14:19 +00:00
|
|
|
</ScrollForm>
|
|
|
|
</PageSection>
|
2021-02-28 20:02:31 +00:00
|
|
|
);
|
|
|
|
};
|