public client = false when clientAuthentication (#505)

fixing: #392
This commit is contained in:
Erik Jan de Wit 2021-04-06 20:14:56 +02:00 committed by GitHub
parent 8cd88b9a1d
commit dd19613557
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -191,7 +191,7 @@ export const ClientDetails = () => {
) => { ) => {
if (await form.trigger()) { if (await form.trigger()) {
if ( if (
client?.publicClient && !client?.publicClient &&
client?.clientAuthenticatorType !== client?.clientAuthenticatorType !==
form.getValues("clientAuthenticatorType") && form.getValues("clientAuthenticatorType") &&
!confirmed !confirmed
@ -285,7 +285,7 @@ export const ClientDetails = () => {
reset={() => setupForm(client)} reset={() => setupForm(client)}
/> />
</Tab> </Tab>
{client.publicClient && ( {!client.publicClient && (
<Tab <Tab
id="credentials" id="credentials"
eventKey="credentials" eventKey="credentials"

View file

@ -40,7 +40,7 @@ export const CapabilityConfig = ({
> >
<Controller <Controller
name="publicClient" name="publicClient"
defaultValue={false} defaultValue={true}
control={control} control={control}
render={({ onChange, value }) => ( render={({ onChange, value }) => (
<Switch <Switch
@ -49,8 +49,8 @@ export const CapabilityConfig = ({
name="publicClient" name="publicClient"
label={t("common:on")} label={t("common:on")}
labelOff={t("common:off")} labelOff={t("common:off")}
isChecked={value} isChecked={!value}
onChange={onChange} onChange={(value) => onChange(!value)}
/> />
)} )}
/> />
@ -78,7 +78,7 @@ export const CapabilityConfig = ({
setValue("serviceAccountsEnabled", true); setValue("serviceAccountsEnabled", true);
} }
}} }}
isDisabled={!clientAuthentication} isDisabled={clientAuthentication}
/> />
)} )}
/> />

View file

@ -31,7 +31,7 @@ export const NewClientForm = () => {
clientId: "", clientId: "",
name: "", name: "",
description: "", description: "",
publicClient: false, publicClient: true,
authorizationServicesEnabled: false, authorizationServicesEnabled: false,
serviceAccountsEnabled: false, serviceAccountsEnabled: false,
implicitFlowEnabled: false, implicitFlowEnabled: false,