2021-10-06 11:05:27 +00:00
|
|
|
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
|
|
|
|
import React, { useMemo, useState } from "react";
|
2020-09-22 12:43:51 +00:00
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import {
|
|
|
|
FormGroup,
|
|
|
|
TextInput,
|
|
|
|
Form,
|
|
|
|
Switch,
|
|
|
|
TextArea,
|
2021-03-19 07:49:33 +00:00
|
|
|
Select,
|
|
|
|
SelectVariant,
|
|
|
|
SelectOption,
|
2022-02-22 11:22:29 +00:00
|
|
|
ValidatedOptions,
|
2020-09-22 12:43:51 +00:00
|
|
|
} from "@patternfly/react-core";
|
2021-02-28 20:02:31 +00:00
|
|
|
import { Controller, useFormContext } from "react-hook-form";
|
2020-09-22 12:43:51 +00:00
|
|
|
|
|
|
|
import { ScrollForm } from "../components/scroll-form/ScrollForm";
|
|
|
|
import { ClientDescription } from "./ClientDescription";
|
|
|
|
import { CapabilityConfig } from "./add/CapabilityConfig";
|
2020-11-02 20:15:09 +00:00
|
|
|
import { MultiLineInput } from "../components/multi-line-input/MultiLineInput";
|
2020-10-28 18:17:15 +00:00
|
|
|
import { FormAccess } from "../components/form-access/FormAccess";
|
2021-02-23 08:55:24 +00:00
|
|
|
import { HelpItem } from "../components/help-enabler/HelpItem";
|
2021-03-19 07:49:33 +00:00
|
|
|
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
|
|
|
import { SaveReset } from "./advanced/SaveReset";
|
2021-10-05 10:32:20 +00:00
|
|
|
import { SamlConfig } from "./add/SamlConfig";
|
|
|
|
import { SamlSignature } from "./add/SamlSignature";
|
2022-03-07 17:08:14 +00:00
|
|
|
import environment from "../environment";
|
|
|
|
import { useRealm } from "../context/realm-context/RealmContext";
|
2020-09-22 12:43:51 +00:00
|
|
|
|
2020-11-02 20:15:09 +00:00
|
|
|
type ClientSettingsProps = {
|
2021-10-06 11:05:27 +00:00
|
|
|
client: ClientRepresentation;
|
2020-11-02 20:15:09 +00:00
|
|
|
save: () => void;
|
2021-03-19 07:49:33 +00:00
|
|
|
reset: () => void;
|
2020-11-02 20:15:09 +00:00
|
|
|
};
|
2020-10-13 17:57:35 +00:00
|
|
|
|
2021-10-06 11:05:27 +00:00
|
|
|
export const ClientSettings = ({
|
|
|
|
client,
|
|
|
|
save,
|
|
|
|
reset,
|
|
|
|
}: ClientSettingsProps) => {
|
2022-03-09 16:42:23 +00:00
|
|
|
const { register, control, watch, errors } =
|
|
|
|
useFormContext<ClientRepresentation>();
|
2020-11-02 20:15:09 +00:00
|
|
|
const { t } = useTranslation("clients");
|
2022-03-07 17:08:14 +00:00
|
|
|
const { realm } = useRealm();
|
2020-09-25 17:42:32 +00:00
|
|
|
|
2021-03-19 07:49:33 +00:00
|
|
|
const [loginThemeOpen, setLoginThemeOpen] = useState(false);
|
|
|
|
const loginThemes = useServerInfo().themes!["login"];
|
2021-10-05 10:32:20 +00:00
|
|
|
const consentRequired = watch("consentRequired");
|
2021-03-19 07:49:33 +00:00
|
|
|
const displayOnConsentScreen: string = watch(
|
2021-12-08 15:08:42 +00:00
|
|
|
"attributes.display.on.consent.screen"
|
2021-03-19 07:49:33 +00:00
|
|
|
);
|
2021-10-05 10:32:20 +00:00
|
|
|
const protocol = watch("protocol");
|
2022-03-02 21:59:37 +00:00
|
|
|
const frontchannelLogout = watch("frontchannelLogout");
|
2022-03-07 17:08:14 +00:00
|
|
|
const idpInitiatedSsoUrlName: string = watch(
|
|
|
|
"attributes.saml_idp_initiated_sso_url_name"
|
|
|
|
);
|
2021-10-06 11:05:27 +00:00
|
|
|
|
|
|
|
const sections = useMemo(() => {
|
|
|
|
let result = ["generalSettings"];
|
|
|
|
|
|
|
|
if (protocol === "saml") {
|
|
|
|
result = [...result, "samlCapabilityConfig", "signatureAndEncryption"];
|
|
|
|
} else if (!client.bearerOnly) {
|
|
|
|
result = [...result, "capabilityConfig"];
|
2022-02-18 00:41:05 +00:00
|
|
|
} else {
|
|
|
|
return [...result, "accessSettings"];
|
2021-10-06 11:05:27 +00:00
|
|
|
}
|
|
|
|
|
2022-02-22 11:22:29 +00:00
|
|
|
return [...result, "accessSettings", "loginSettings", "logoutSettings"];
|
2021-10-06 11:05:27 +00:00
|
|
|
}, [protocol, client]);
|
2021-03-19 07:49:33 +00:00
|
|
|
|
2020-09-22 12:43:51 +00:00
|
|
|
return (
|
2021-08-26 12:15:28 +00:00
|
|
|
<ScrollForm
|
|
|
|
className="pf-u-px-lg"
|
2021-10-05 10:32:20 +00:00
|
|
|
sections={sections.map((section) => t(section))}
|
2021-08-26 12:15:28 +00:00
|
|
|
>
|
|
|
|
<Form isHorizontal>
|
2022-03-02 16:08:01 +00:00
|
|
|
<ClientDescription protocol={client.protocol} />
|
2021-08-26 12:15:28 +00:00
|
|
|
</Form>
|
2021-10-06 11:05:27 +00:00
|
|
|
{protocol === "saml" ? (
|
|
|
|
<SamlConfig />
|
|
|
|
) : (
|
|
|
|
!client.bearerOnly && <CapabilityConfig />
|
|
|
|
)}
|
2021-10-05 10:32:20 +00:00
|
|
|
{protocol === "saml" && <SamlSignature />}
|
2021-08-26 12:15:28 +00:00
|
|
|
<FormAccess isHorizontal role="manage-clients">
|
2022-02-18 00:41:05 +00:00
|
|
|
{!client.bearerOnly && (
|
|
|
|
<>
|
|
|
|
<FormGroup
|
|
|
|
label={t("rootUrl")}
|
|
|
|
fieldId="kc-root-url"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:rootUrl"
|
|
|
|
fieldLabelId="clients:rootUrl"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="kc-root-url"
|
|
|
|
name="rootUrl"
|
|
|
|
ref={register}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("homeURL")}
|
|
|
|
fieldId="kc-home-url"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:homeURL"
|
|
|
|
fieldLabelId="clients:homeURL"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="kc-home-url"
|
|
|
|
name="baseUrl"
|
|
|
|
ref={register}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
2022-03-07 17:08:14 +00:00
|
|
|
label={t("validRedirectUri")}
|
|
|
|
fieldId="kc-redirect"
|
2022-02-18 00:41:05 +00:00
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2022-03-07 17:08:14 +00:00
|
|
|
helpText="clients-help:validRedirectURIs"
|
|
|
|
fieldLabelId="clients:validRedirectUri"
|
2022-02-18 00:41:05 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MultiLineInput
|
2022-03-07 17:08:14 +00:00
|
|
|
name="redirectUris"
|
|
|
|
aria-label={t("validRedirectUri")}
|
|
|
|
addButtonLabel="clients:addRedirectUri"
|
2022-02-18 00:41:05 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
2022-03-07 17:08:14 +00:00
|
|
|
{protocol === "saml" && (
|
|
|
|
<>
|
|
|
|
<FormGroup
|
|
|
|
label={t("idpInitiatedSsoUrlName")}
|
|
|
|
fieldId="idpInitiatedSsoUrlName"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:idpInitiatedSsoUrlName"
|
|
|
|
fieldLabelId="clients:idpInitiatedSsoUrlName"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
helperText={
|
|
|
|
idpInitiatedSsoUrlName !== "" &&
|
|
|
|
t("idpInitiatedSsoUrlNameHelp", {
|
|
|
|
url: `${environment.authServerUrl}/realms/${realm}/protocol/saml/clients/${idpInitiatedSsoUrlName}`,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="idpInitiatedSsoUrlName"
|
|
|
|
name="attributes.saml_idp_initiated_sso_url_name"
|
|
|
|
ref={register}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("idpInitiatedSsoRelayState")}
|
|
|
|
fieldId="idpInitiatedSsoRelayState"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:idpInitiatedSsoRelayState"
|
|
|
|
fieldLabelId="clients:idpInitiatedSsoRelayState"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="idpInitiatedSsoRelayState"
|
|
|
|
name="attributes.saml_idp_initiated_sso_relay_state"
|
|
|
|
ref={register}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("masterSamlProcessingUrl")}
|
|
|
|
fieldId="masterSamlProcessingUrl"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:masterSamlProcessingUrl"
|
|
|
|
fieldLabelId="clients:masterSamlProcessingUrl"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="masterSamlProcessingUrl"
|
|
|
|
name="adminUrl"
|
|
|
|
ref={register}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
{protocol !== "saml" && (
|
|
|
|
<FormGroup
|
|
|
|
label={t("webOrigins")}
|
|
|
|
fieldId="kc-web-origins"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:webOrigins"
|
|
|
|
fieldLabelId="clients:webOrigins"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<MultiLineInput
|
|
|
|
name="webOrigins"
|
|
|
|
aria-label={t("webOrigins")}
|
|
|
|
addButtonLabel="clients:addWebOrigins"
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
)}
|
2022-02-18 00:41:05 +00:00
|
|
|
</>
|
|
|
|
)}
|
2022-03-07 17:08:14 +00:00
|
|
|
{protocol !== "saml" && (
|
|
|
|
<FormGroup
|
|
|
|
label={t("adminURL")}
|
|
|
|
fieldId="kc-admin-url"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:adminURL"
|
|
|
|
fieldLabelId="clients:adminURL"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="kc-admin-url"
|
|
|
|
name="adminUrl"
|
|
|
|
ref={register}
|
2020-11-02 20:15:09 +00:00
|
|
|
/>
|
2022-03-07 17:08:14 +00:00
|
|
|
</FormGroup>
|
|
|
|
)}
|
2022-02-18 00:41:05 +00:00
|
|
|
{client.bearerOnly && (
|
|
|
|
<SaveReset
|
|
|
|
className="keycloak__form_actions"
|
|
|
|
name="settings"
|
|
|
|
save={save}
|
|
|
|
reset={reset}
|
|
|
|
/>
|
|
|
|
)}
|
2021-08-26 12:15:28 +00:00
|
|
|
</FormAccess>
|
|
|
|
<FormAccess isHorizontal role="manage-clients">
|
|
|
|
<FormGroup
|
|
|
|
label={t("loginTheme")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:loginTheme"
|
2021-12-14 14:56:36 +00:00
|
|
|
fieldLabelId="clients:loginTheme"
|
2020-11-02 20:15:09 +00:00
|
|
|
/>
|
2021-08-26 12:15:28 +00:00
|
|
|
}
|
|
|
|
fieldId="loginTheme"
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="attributes.login_theme"
|
|
|
|
defaultValue=""
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<Select
|
|
|
|
toggleId="loginTheme"
|
2021-11-30 13:07:44 +00:00
|
|
|
onToggle={setLoginThemeOpen}
|
2021-08-26 12:15:28 +00:00
|
|
|
onSelect={(_, value) => {
|
2021-11-30 13:07:44 +00:00
|
|
|
onChange(value.toString());
|
2021-08-26 12:15:28 +00:00
|
|
|
setLoginThemeOpen(false);
|
|
|
|
}}
|
|
|
|
selections={value || t("common:choose")}
|
|
|
|
variant={SelectVariant.single}
|
|
|
|
aria-label={t("loginTheme")}
|
|
|
|
isOpen={loginThemeOpen}
|
|
|
|
>
|
2022-02-22 11:22:29 +00:00
|
|
|
{[
|
|
|
|
<SelectOption key="empty" value="">
|
|
|
|
{t("common:choose")}
|
|
|
|
</SelectOption>,
|
|
|
|
...loginThemes.map((theme) => (
|
2021-08-26 12:15:28 +00:00
|
|
|
<SelectOption
|
|
|
|
selected={theme.name === value}
|
|
|
|
key={theme.name}
|
|
|
|
value={theme.name}
|
|
|
|
/>
|
2022-02-22 11:22:29 +00:00
|
|
|
)),
|
|
|
|
]}
|
2021-08-26 12:15:28 +00:00
|
|
|
</Select>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("consentRequired")}
|
2021-09-17 17:50:56 +00:00
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:consentRequired"
|
2021-12-14 14:56:36 +00:00
|
|
|
fieldLabelId="clients:consentRequired"
|
2021-09-17 17:50:56 +00:00
|
|
|
/>
|
|
|
|
}
|
2021-08-26 12:15:28 +00:00
|
|
|
fieldId="kc-consent"
|
|
|
|
hasNoPaddingTop
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="consentRequired"
|
|
|
|
defaultValue={false}
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<Switch
|
|
|
|
id="kc-consent-switch"
|
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
|
|
|
isChecked={value}
|
|
|
|
onChange={onChange}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("displayOnClient")}
|
2021-09-17 17:50:56 +00:00
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:displayOnClient"
|
2021-12-14 14:56:36 +00:00
|
|
|
fieldLabelId="clients:displayOnClient"
|
2021-09-17 17:50:56 +00:00
|
|
|
/>
|
|
|
|
}
|
2021-08-26 12:15:28 +00:00
|
|
|
fieldId="kc-display-on-client"
|
|
|
|
hasNoPaddingTop
|
|
|
|
>
|
|
|
|
<Controller
|
2021-12-08 15:08:42 +00:00
|
|
|
name="attributes.display.on.consent.screen"
|
2021-08-26 12:15:28 +00:00
|
|
|
defaultValue={false}
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<Switch
|
|
|
|
id="kc-display-on-client-switch"
|
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
|
|
|
isChecked={value === "true"}
|
|
|
|
onChange={(value) => onChange("" + value)}
|
|
|
|
isDisabled={!consentRequired}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("consentScreenText")}
|
2021-09-17 17:50:56 +00:00
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:consentScreenText"
|
2021-12-14 14:56:36 +00:00
|
|
|
fieldLabelId="clients:consentScreenText"
|
2021-09-17 17:50:56 +00:00
|
|
|
/>
|
|
|
|
}
|
2021-08-26 12:15:28 +00:00
|
|
|
fieldId="kc-consent-screen-text"
|
|
|
|
>
|
|
|
|
<TextArea
|
|
|
|
id="kc-consent-screen-text"
|
2021-12-08 15:08:42 +00:00
|
|
|
name="attributes.consent.screen.text"
|
2021-08-26 12:15:28 +00:00
|
|
|
ref={register}
|
|
|
|
isDisabled={!(consentRequired && displayOnConsentScreen === "true")}
|
2021-04-06 17:19:15 +00:00
|
|
|
/>
|
2021-08-26 12:15:28 +00:00
|
|
|
</FormGroup>
|
2022-02-22 11:22:29 +00:00
|
|
|
</FormAccess>
|
|
|
|
<FormAccess isHorizontal role="manage-clients">
|
2022-03-02 21:59:37 +00:00
|
|
|
{protocol === "openid-connect" && (
|
|
|
|
<>
|
|
|
|
<FormGroup
|
|
|
|
label={t("frontchannelLogout")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:frontchannelLogout"
|
|
|
|
fieldLabelId="clients:frontchannelLogout"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="frontchannelLogout"
|
|
|
|
hasNoPaddingTop
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="frontchannelLogout"
|
|
|
|
defaultValue={true}
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<Switch
|
|
|
|
id="frontchannelLogout"
|
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
|
|
|
isChecked={value.toString() === "true"}
|
|
|
|
onChange={(value) => onChange(value.toString())}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
{frontchannelLogout?.toString() === "true" && (
|
|
|
|
<FormGroup
|
|
|
|
label={t("frontchannelLogoutUrl")}
|
|
|
|
fieldId="frontchannelLogoutUrl"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:frontchannelLogoutUrl"
|
|
|
|
fieldLabelId="clients:frontchannelLogoutUrl"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
|
|
|
errors.attributes?.frontchannel?.logout?.url?.message
|
|
|
|
}
|
|
|
|
validated={
|
|
|
|
errors.attributes?.frontchannel?.logout?.url?.message
|
|
|
|
? ValidatedOptions.error
|
|
|
|
: ValidatedOptions.default
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="frontchannelLogoutUrl"
|
|
|
|
name="attributes.frontchannel.logout.url"
|
|
|
|
ref={register({
|
|
|
|
validate: (uri) =>
|
|
|
|
((uri.startsWith("https://") ||
|
|
|
|
uri.startsWith("http://")) &&
|
|
|
|
!uri.includes("*")) ||
|
|
|
|
uri === "" ||
|
|
|
|
t("frontchannelUrlInvalid").toString(),
|
|
|
|
})}
|
|
|
|
validated={
|
|
|
|
errors.attributes?.frontchannel?.logout?.url?.message
|
|
|
|
? ValidatedOptions.error
|
|
|
|
: ValidatedOptions.default
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
)}
|
|
|
|
</>
|
|
|
|
)}
|
2022-02-22 11:22:29 +00:00
|
|
|
<FormGroup
|
|
|
|
label={t("backchannelLogoutUrl")}
|
|
|
|
fieldId="backchannelLogoutUrl"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:backchannelLogoutUrl"
|
|
|
|
fieldLabelId="clients:backchannelLogoutUrl"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
helperTextInvalid={
|
|
|
|
errors.attributes?.backchannel?.logout?.url?.message
|
|
|
|
}
|
|
|
|
validated={
|
|
|
|
errors.attributes?.backchannel?.logout?.url?.message
|
|
|
|
? ValidatedOptions.error
|
|
|
|
: ValidatedOptions.default
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<TextInput
|
|
|
|
type="text"
|
|
|
|
id="backchannelLogoutUrl"
|
|
|
|
name="attributes.backchannel.logout.url"
|
|
|
|
ref={register({
|
|
|
|
validate: (uri) =>
|
|
|
|
((uri.startsWith("https://") || uri.startsWith("http://")) &&
|
2022-03-02 21:59:37 +00:00
|
|
|
!uri.includes("*")) ||
|
2022-02-22 11:22:29 +00:00
|
|
|
uri === "" ||
|
|
|
|
t("backchannelUrlInvalid").toString(),
|
|
|
|
})}
|
|
|
|
validated={
|
|
|
|
errors.attributes?.backchannel?.logout?.url?.message
|
|
|
|
? ValidatedOptions.error
|
|
|
|
: ValidatedOptions.default
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("backchannelLogoutSessionRequired")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:backchannelLogoutSessionRequired"
|
|
|
|
fieldLabelId="clients:backchannelLogoutSessionRequired"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="backchannelLogoutSessionRequired"
|
|
|
|
hasNoPaddingTop
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="attributes.backchannel.logout.session.required"
|
|
|
|
defaultValue="true"
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<Switch
|
|
|
|
id="backchannelLogoutSessionRequired"
|
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
|
|
|
isChecked={value === "true"}
|
|
|
|
onChange={(value) => onChange(value.toString())}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("backchannelLogoutRevokeOfflineSessions")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:backchannelLogoutRevokeOfflineSessions"
|
|
|
|
fieldLabelId="clients:backchannelLogoutRevokeOfflineSessions"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="backchannelLogoutRevokeOfflineSessions"
|
|
|
|
hasNoPaddingTop
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="attributes.backchannel.logout.revoke.offline.tokens"
|
|
|
|
defaultValue="false"
|
|
|
|
control={control}
|
|
|
|
render={({ onChange, value }) => (
|
|
|
|
<Switch
|
|
|
|
id="backchannelLogoutRevokeOfflineSessions"
|
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
|
|
|
isChecked={value === "true"}
|
|
|
|
onChange={(value) => onChange(value.toString())}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
2021-08-26 12:15:28 +00:00
|
|
|
<SaveReset
|
|
|
|
className="keycloak__form_actions"
|
|
|
|
name="settings"
|
|
|
|
save={save}
|
|
|
|
reset={reset}
|
|
|
|
/>
|
|
|
|
</FormAccess>
|
|
|
|
</ScrollForm>
|
2020-09-22 12:43:51 +00:00
|
|
|
);
|
|
|
|
};
|