parent
2417c285e3
commit
408caf6d0f
4 changed files with 56 additions and 12 deletions
|
@ -26,6 +26,9 @@
|
||||||
"signature-algorithm": "JWA algorithm, which the client needs to use when signing a JWT for authentication. If left blank, the client is allowed to use any algorithm.",
|
"signature-algorithm": "JWA algorithm, which the client needs to use when signing a JWT for authentication. If left blank, the client is allowed to use any algorithm.",
|
||||||
"subject": "A regular expression for validating Subject DN in the Client Certificate. Use \"(.*?)(?:$)\" to match all kind of expressions.",
|
"subject": "A regular expression for validating Subject DN in the Client Certificate. Use \"(.*?)(?:$)\" to match all kind of expressions.",
|
||||||
"evaluateExplain": "This page allows you to see all protocol mappers and role scope mappings",
|
"evaluateExplain": "This page allows you to see all protocol mappers and role scope mappings",
|
||||||
|
"effectiveProtocolMappers": "Contains all default client scopes and selected optional scopes. All protocol mappers and role scope mappings of all those client scopes will be used when generating access token issued for your client",
|
||||||
|
"effectiveRoleScopeMappings": "Selected Optional Client Scopes, which will be used when issuing access token for this client. You can see above what value of OAuth Scope Parameter needs to be used when you want to have these optional client scopes applied when the initial OpenID Connect Authentication request will be sent from your client adapter",
|
||||||
|
"generatedAccessToken": "Example access token",
|
||||||
"scopeParameter": "You can copy/paste this value of scope parameter and use it in initial OpenID Connect Authentication Request sent from this client adapter. Default client scopes and selected optional client scopes will be used when generating token issued for this client",
|
"scopeParameter": "You can copy/paste this value of scope parameter and use it in initial OpenID Connect Authentication Request sent from this client adapter. Default client scopes and selected optional client scopes will be used when generating token issued for this client",
|
||||||
"user": "Optionally select user, for whom the example access token will be generated. If you do not select a user, example access token will not be generated during evaluation",
|
"user": "Optionally select user, for whom the example access token will be generated. If you do not select a user, example access token will not be generated during evaluation",
|
||||||
"notBefore": "Revoke any tokens issued before this date for this client.",
|
"notBefore": "Revoke any tokens issued before this date for this client.",
|
||||||
|
|
|
@ -41,6 +41,7 @@ import { KeycloakDataTable } from "../../components/table-toolbar/KeycloakDataTa
|
||||||
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
||||||
|
|
||||||
import "./evaluate.css";
|
import "./evaluate.css";
|
||||||
|
import { HelpContext } from "../../components/help-enabler/HelpHeader";
|
||||||
|
|
||||||
export type EvaluateScopesProps = {
|
export type EvaluateScopesProps = {
|
||||||
clientId: string;
|
clientId: string;
|
||||||
|
@ -65,7 +66,7 @@ const ProtocolMappers = ({
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
name: "mapperName",
|
name: "mapperName",
|
||||||
displayKey: "clients:name",
|
displayKey: "common:name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "containerName",
|
name: "containerName",
|
||||||
|
@ -77,7 +78,7 @@ const ProtocolMappers = ({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "type.priority",
|
name: "type.priority",
|
||||||
displayKey: "commmon:priority",
|
displayKey: "common:priority",
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
@ -117,6 +118,7 @@ const EffectiveRoles = ({
|
||||||
export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
||||||
const prefix = "openid";
|
const prefix = "openid";
|
||||||
const { t } = useTranslation("clients");
|
const { t } = useTranslation("clients");
|
||||||
|
const { enabled } = useContext(HelpContext);
|
||||||
const adminClient = useAdminClient();
|
const adminClient = useAdminClient();
|
||||||
const { realm } = useContext(RealmContext);
|
const { realm } = useContext(RealmContext);
|
||||||
const mapperTypes = useServerInfo().protocolMapperTypes![protocol];
|
const mapperTypes = useServerInfo().protocolMapperTypes![protocol];
|
||||||
|
@ -255,11 +257,13 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageSection variant="light">
|
<PageSection variant="light">
|
||||||
|
{enabled && (
|
||||||
<TextContent className="keycloak__scopes_evaluate__intro">
|
<TextContent className="keycloak__scopes_evaluate__intro">
|
||||||
<Text>
|
<Text>
|
||||||
<QuestionCircleIcon /> {t("clients-help:evaluateExplain")}
|
<QuestionCircleIcon /> {t("clients-help:evaluateExplain")}
|
||||||
</Text>
|
</Text>
|
||||||
</TextContent>
|
</TextContent>
|
||||||
|
)}
|
||||||
<Form isHorizontal>
|
<Form isHorizontal>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={t("scopeParameter")}
|
label={t("scopeParameter")}
|
||||||
|
@ -386,6 +390,7 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
||||||
</GridItem>
|
</GridItem>
|
||||||
<GridItem span={4}>
|
<GridItem span={4}>
|
||||||
<Tabs
|
<Tabs
|
||||||
|
id="tabs"
|
||||||
key={key}
|
key={key}
|
||||||
isVertical
|
isVertical
|
||||||
activeKey={activeTab}
|
activeKey={activeTab}
|
||||||
|
@ -396,7 +401,15 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
||||||
aria-controls="effectiveProtocolMappers"
|
aria-controls="effectiveProtocolMappers"
|
||||||
eventKey={0}
|
eventKey={0}
|
||||||
title={
|
title={
|
||||||
<TabTitleText>{t("effectiveProtocolMappers")}</TabTitleText>
|
<TabTitleText>
|
||||||
|
{t("effectiveProtocolMappers")}{" "}
|
||||||
|
<HelpItem
|
||||||
|
forID="effectiveProtocolMappers"
|
||||||
|
forLabel={t("effectiveProtocolMappers")}
|
||||||
|
helpText="clients-help:effectiveProtocolMappers"
|
||||||
|
noVerticalAlign={false}
|
||||||
|
/>
|
||||||
|
</TabTitleText>
|
||||||
}
|
}
|
||||||
tabContentRef={tabContent1}
|
tabContentRef={tabContent1}
|
||||||
/>
|
/>
|
||||||
|
@ -405,7 +418,15 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
||||||
aria-controls="effectiveRoleScopeMappings"
|
aria-controls="effectiveRoleScopeMappings"
|
||||||
eventKey={1}
|
eventKey={1}
|
||||||
title={
|
title={
|
||||||
<TabTitleText>{t("effectiveRoleScopeMappings")}</TabTitleText>
|
<TabTitleText>
|
||||||
|
{t("effectiveRoleScopeMappings")}{" "}
|
||||||
|
<HelpItem
|
||||||
|
forID="effectiveRoleScopeMappings"
|
||||||
|
forLabel={t("effectiveRoleScopeMappings")}
|
||||||
|
helpText="clients-help:effectiveRoleScopeMappings"
|
||||||
|
noVerticalAlign={false}
|
||||||
|
/>
|
||||||
|
</TabTitleText>
|
||||||
}
|
}
|
||||||
tabContentRef={tabContent2}
|
tabContentRef={tabContent2}
|
||||||
></Tab>
|
></Tab>
|
||||||
|
@ -413,7 +434,17 @@ export const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {
|
||||||
id="generatedAccessToken"
|
id="generatedAccessToken"
|
||||||
aria-controls="generatedAccessToken"
|
aria-controls="generatedAccessToken"
|
||||||
eventKey={2}
|
eventKey={2}
|
||||||
title={<TabTitleText>{t("generatedAccessToken")}</TabTitleText>}
|
title={
|
||||||
|
<TabTitleText>
|
||||||
|
{t("generatedAccessToken")}{" "}
|
||||||
|
<HelpItem
|
||||||
|
forID="generatedAccessToken"
|
||||||
|
forLabel={t("generatedAccessToken")}
|
||||||
|
helpText="clients-help:generatedAccessToken"
|
||||||
|
noVerticalAlign={false}
|
||||||
|
/>
|
||||||
|
</TabTitleText>
|
||||||
|
}
|
||||||
tabContentRef={tabContent3}
|
tabContentRef={tabContent3}
|
||||||
/>
|
/>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
|
@ -9,3 +9,7 @@
|
||||||
.keycloak__scopes_evaluate__tabs {
|
.keycloak__scopes_evaluate__tabs {
|
||||||
padding-top: var(--pf-global--spacer--2xl);
|
padding-top: var(--pf-global--spacer--2xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabs .pf-c-tabs__list {
|
||||||
|
max-width: 300px;
|
||||||
|
}
|
||||||
|
|
|
@ -8,9 +8,15 @@ type HelpItemProps = {
|
||||||
helpText: string;
|
helpText: string;
|
||||||
forLabel: string;
|
forLabel: string;
|
||||||
forID: string;
|
forID: string;
|
||||||
|
noVerticalAlign?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const HelpItem = ({ helpText, forLabel, forID }: HelpItemProps) => {
|
export const HelpItem = ({
|
||||||
|
helpText,
|
||||||
|
forLabel,
|
||||||
|
forID,
|
||||||
|
noVerticalAlign = true,
|
||||||
|
}: HelpItemProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { enabled } = useContext(HelpContext);
|
const { enabled } = useContext(HelpContext);
|
||||||
return (
|
return (
|
||||||
|
@ -24,7 +30,7 @@ export const HelpItem = ({ helpText, forLabel, forID }: HelpItemProps) => {
|
||||||
aria-describedby={forID}
|
aria-describedby={forID}
|
||||||
className="pf-c-form__group-label-help"
|
className="pf-c-form__group-label-help"
|
||||||
>
|
>
|
||||||
<HelpIcon noVerticalAlign />
|
<HelpIcon noVerticalAlign={noVerticalAlign} />
|
||||||
</button>
|
</button>
|
||||||
</Popover>
|
</Popover>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue