Fix login and logout settings for SAML (#2947)

This commit is contained in:
Stan Silvert 2022-07-13 15:13:47 -04:00 committed by GitHub
parent 1dc2964757
commit 9291f3fb53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 92 additions and 86 deletions

View file

@ -63,7 +63,7 @@ export const ClientSettings = (props: ClientSettingsProps) => {
}, },
{ {
title: t("loginSettings"), title: t("loginSettings"),
isHidden: protocol !== "openid-connect" || client.bearerOnly, isHidden: client.bearerOnly,
panel: <LoginSettingsPanel access={client.access?.configure} />, panel: <LoginSettingsPanel access={client.access?.configure} />,
}, },
{ {

View file

@ -35,7 +35,7 @@ export const LogoutPanel = ({
isHorizontal isHorizontal
fineGrainedAccess={access?.configure} fineGrainedAccess={access?.configure}
role="manage-clients" role="manage-clients"
className="pf-u-pb-xl" className="pf-u-pb-4xl"
> >
<FormGroup <FormGroup
label={t("frontchannelLogout")} label={t("frontchannelLogout")}
@ -101,6 +101,8 @@ export const LogoutPanel = ({
/> />
</FormGroup> </FormGroup>
)} )}
{protocol === "openid-connect" && (
<>
<FormGroup <FormGroup
label={t("backchannelLogoutUrl")} label={t("backchannelLogoutUrl")}
fieldId="backchannelLogoutUrl" fieldId="backchannelLogoutUrl"
@ -110,7 +112,9 @@ export const LogoutPanel = ({
fieldLabelId="clients:backchannelLogoutUrl" fieldLabelId="clients:backchannelLogoutUrl"
/> />
} }
helperTextInvalid={errors.attributes?.backchannel?.logout?.url?.message} helperTextInvalid={
errors.attributes?.backchannel?.logout?.url?.message
}
validated={ validated={
errors.attributes?.backchannel?.logout?.url?.message errors.attributes?.backchannel?.logout?.url?.message
? ValidatedOptions.error ? ValidatedOptions.error
@ -187,6 +191,8 @@ export const LogoutPanel = ({
)} )}
/> />
</FormGroup> </FormGroup>
</>
)}
<SaveReset <SaveReset
className="keycloak__form_actions" className="keycloak__form_actions"
name="settings" name="settings"