Added missing fields (#2163)
This commit is contained in:
parent
127cb343ab
commit
1b6d679d89
5 changed files with 69 additions and 5 deletions
|
@ -376,7 +376,6 @@ export const AdvancedTab = ({
|
|||
{t("clients-help:fineGrainOpenIdConnectConfiguration")}
|
||||
</Text>
|
||||
<FineGrainOpenIdConnect
|
||||
control={control}
|
||||
save={() => save()}
|
||||
reset={() =>
|
||||
convertToFormValues(attributes, (key, value) =>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Control, Controller } from "react-hook-form";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
import {
|
||||
ActionGroup,
|
||||
Button,
|
||||
|
@ -8,6 +8,7 @@ import {
|
|||
Select,
|
||||
SelectOption,
|
||||
SelectVariant,
|
||||
TextInput,
|
||||
} from "@patternfly/react-core";
|
||||
|
||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||
|
@ -17,13 +18,11 @@ import { sortProviders } from "../../util";
|
|||
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
|
||||
|
||||
type FineGrainOpenIdConnectProps = {
|
||||
control: Control<Record<string, any>>;
|
||||
save: () => void;
|
||||
reset: () => void;
|
||||
};
|
||||
|
||||
export const FineGrainOpenIdConnect = ({
|
||||
control,
|
||||
save,
|
||||
reset,
|
||||
}: FineGrainOpenIdConnectProps) => {
|
||||
|
@ -56,6 +55,8 @@ export const FineGrainOpenIdConnect = ({
|
|||
setAuthorizationEncryptedResponseOpen,
|
||||
] = useState(false);
|
||||
|
||||
const { control, register } = useFormContext();
|
||||
|
||||
const keyOptions = [
|
||||
<SelectOption key="empty" value="">
|
||||
{t("common:choose")}
|
||||
|
@ -141,6 +142,60 @@ export const FineGrainOpenIdConnect = ({
|
|||
|
||||
return (
|
||||
<FormAccess role="manage-clients" isHorizontal>
|
||||
<FormGroup
|
||||
label={t("logoUrl")}
|
||||
fieldId="logoUrl"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="clients-help:logoUrl"
|
||||
fieldLabelId="clients:logoUrl"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
type="text"
|
||||
id="logoUrl"
|
||||
name="attributes.logoUri"
|
||||
data-testid="logoUrl"
|
||||
ref={register}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("policyUrl")}
|
||||
fieldId="policyUrl"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="clients-help:policyUrl"
|
||||
fieldLabelId="clients:policyUrl"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
type="text"
|
||||
id="policyUrl"
|
||||
name="attributes.policyUri"
|
||||
data-testid="policyUrl"
|
||||
ref={register}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("termsOfServiceUrl")}
|
||||
fieldId="termsOfServiceUrl"
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="clients-help:termsOfServiceUrl"
|
||||
fieldLabelId="clients:termsOfServiceUrl"
|
||||
/>
|
||||
}
|
||||
>
|
||||
<TextInput
|
||||
type="text"
|
||||
id="termsOfServiceUrl"
|
||||
name="attributes.tosUri"
|
||||
data-testid="termsOfServiceUrl"
|
||||
ref={register}
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup
|
||||
label={t("accessTokenSignatureAlgorithm")}
|
||||
fieldId="accessTokenSignatureAlgorithm"
|
||||
|
|
|
@ -118,6 +118,11 @@ export default {
|
|||
"This section is used to configure advanced settings of this client related to OpenID Connect protocol.",
|
||||
fineGrainSamlEndpointConfig:
|
||||
"This section to configure exact URLs for Assertion Consumer and Single Logout Service.",
|
||||
logoUrl: "URL that references a logo for the Client application",
|
||||
policyUrl:
|
||||
"URL that the Relying Party Client provides to the End-User to read about the how the profile data will be used",
|
||||
termsOfServiceUrl:
|
||||
"URL that the Relying Party Client provides to the End-User to read about the Relying Party's terms of service",
|
||||
accessTokenSignatureAlgorithm:
|
||||
"JWA algorithm used for signing access tokens.",
|
||||
idTokenSignatureAlgorithm: "JWA algorithm used for signing ID tokens.",
|
||||
|
|
|
@ -473,6 +473,9 @@ export default {
|
|||
fineGrainOpenIdConnectConfiguration:
|
||||
"Fine grain OpenID Connect configuration",
|
||||
fineGrainSamlEndpointConfig: "Fine Grain SAML Endpoint Configuration",
|
||||
logoUrl: "Logo URL",
|
||||
policyUrl: "Policy URL",
|
||||
termsOfServiceUrl: "Terms of service URL",
|
||||
accessTokenSignatureAlgorithm: "Access token signature algorithm",
|
||||
idTokenSignatureAlgorithm: "ID token signature algorithm",
|
||||
idTokenEncryptionKeyManagementAlgorithm:
|
||||
|
|
|
@ -47,7 +47,9 @@ export const AlertProvider: FunctionComponent = ({ children }) => {
|
|||
t(message, {
|
||||
error:
|
||||
"response" in error
|
||||
? error.response?.data?.errorMessage || error.response?.data?.error
|
||||
? error.response?.data?.error_description ||
|
||||
error.response?.data?.errorMessage ||
|
||||
error.response?.data?.error
|
||||
: error,
|
||||
}),
|
||||
AlertVariant.danger
|
||||
|
|
Loading…
Reference in a new issue