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")}
|
{t("clients-help:fineGrainOpenIdConnectConfiguration")}
|
||||||
</Text>
|
</Text>
|
||||||
<FineGrainOpenIdConnect
|
<FineGrainOpenIdConnect
|
||||||
control={control}
|
|
||||||
save={() => save()}
|
save={() => save()}
|
||||||
reset={() =>
|
reset={() =>
|
||||||
convertToFormValues(attributes, (key, value) =>
|
convertToFormValues(attributes, (key, value) =>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Control, Controller } from "react-hook-form";
|
import { Controller, useFormContext } from "react-hook-form";
|
||||||
import {
|
import {
|
||||||
ActionGroup,
|
ActionGroup,
|
||||||
Button,
|
Button,
|
||||||
|
@ -8,6 +8,7 @@ import {
|
||||||
Select,
|
Select,
|
||||||
SelectOption,
|
SelectOption,
|
||||||
SelectVariant,
|
SelectVariant,
|
||||||
|
TextInput,
|
||||||
} from "@patternfly/react-core";
|
} from "@patternfly/react-core";
|
||||||
|
|
||||||
import { FormAccess } from "../../components/form-access/FormAccess";
|
import { FormAccess } from "../../components/form-access/FormAccess";
|
||||||
|
@ -17,13 +18,11 @@ import { sortProviders } from "../../util";
|
||||||
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
|
import { MultiLineInput } from "../../components/multi-line-input/MultiLineInput";
|
||||||
|
|
||||||
type FineGrainOpenIdConnectProps = {
|
type FineGrainOpenIdConnectProps = {
|
||||||
control: Control<Record<string, any>>;
|
|
||||||
save: () => void;
|
save: () => void;
|
||||||
reset: () => void;
|
reset: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FineGrainOpenIdConnect = ({
|
export const FineGrainOpenIdConnect = ({
|
||||||
control,
|
|
||||||
save,
|
save,
|
||||||
reset,
|
reset,
|
||||||
}: FineGrainOpenIdConnectProps) => {
|
}: FineGrainOpenIdConnectProps) => {
|
||||||
|
@ -56,6 +55,8 @@ export const FineGrainOpenIdConnect = ({
|
||||||
setAuthorizationEncryptedResponseOpen,
|
setAuthorizationEncryptedResponseOpen,
|
||||||
] = useState(false);
|
] = useState(false);
|
||||||
|
|
||||||
|
const { control, register } = useFormContext();
|
||||||
|
|
||||||
const keyOptions = [
|
const keyOptions = [
|
||||||
<SelectOption key="empty" value="">
|
<SelectOption key="empty" value="">
|
||||||
{t("common:choose")}
|
{t("common:choose")}
|
||||||
|
@ -141,6 +142,60 @@ export const FineGrainOpenIdConnect = ({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormAccess role="manage-clients" isHorizontal>
|
<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
|
<FormGroup
|
||||||
label={t("accessTokenSignatureAlgorithm")}
|
label={t("accessTokenSignatureAlgorithm")}
|
||||||
fieldId="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.",
|
"This section is used to configure advanced settings of this client related to OpenID Connect protocol.",
|
||||||
fineGrainSamlEndpointConfig:
|
fineGrainSamlEndpointConfig:
|
||||||
"This section to configure exact URLs for Assertion Consumer and Single Logout Service.",
|
"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:
|
accessTokenSignatureAlgorithm:
|
||||||
"JWA algorithm used for signing access tokens.",
|
"JWA algorithm used for signing access tokens.",
|
||||||
idTokenSignatureAlgorithm: "JWA algorithm used for signing ID tokens.",
|
idTokenSignatureAlgorithm: "JWA algorithm used for signing ID tokens.",
|
||||||
|
|
|
@ -473,6 +473,9 @@ export default {
|
||||||
fineGrainOpenIdConnectConfiguration:
|
fineGrainOpenIdConnectConfiguration:
|
||||||
"Fine grain OpenID Connect configuration",
|
"Fine grain OpenID Connect configuration",
|
||||||
fineGrainSamlEndpointConfig: "Fine Grain SAML Endpoint Configuration",
|
fineGrainSamlEndpointConfig: "Fine Grain SAML Endpoint Configuration",
|
||||||
|
logoUrl: "Logo URL",
|
||||||
|
policyUrl: "Policy URL",
|
||||||
|
termsOfServiceUrl: "Terms of service URL",
|
||||||
accessTokenSignatureAlgorithm: "Access token signature algorithm",
|
accessTokenSignatureAlgorithm: "Access token signature algorithm",
|
||||||
idTokenSignatureAlgorithm: "ID token signature algorithm",
|
idTokenSignatureAlgorithm: "ID token signature algorithm",
|
||||||
idTokenEncryptionKeyManagementAlgorithm:
|
idTokenEncryptionKeyManagementAlgorithm:
|
||||||
|
|
|
@ -47,7 +47,9 @@ export const AlertProvider: FunctionComponent = ({ children }) => {
|
||||||
t(message, {
|
t(message, {
|
||||||
error:
|
error:
|
||||||
"response" in 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,
|
: error,
|
||||||
}),
|
}),
|
||||||
AlertVariant.danger
|
AlertVariant.danger
|
||||||
|
|
Loading…
Reference in a new issue