Update login-oauth-grant.ftl page
This commit is contained in:
parent
89ddfa18b7
commit
1d4cf2a446
@ -22,6 +22,7 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
|
|||||||
socialProvidersNode = null,
|
socialProvidersNode = null,
|
||||||
infoNode = null,
|
infoNode = null,
|
||||||
documentTitle,
|
documentTitle,
|
||||||
|
bodyClassName,
|
||||||
kcContext,
|
kcContext,
|
||||||
i18n,
|
i18n,
|
||||||
doUseDefaultCss,
|
doUseDefaultCss,
|
||||||
@ -46,7 +47,7 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
|
|||||||
|
|
||||||
useSetClassName({
|
useSetClassName({
|
||||||
"qualifiedName": "body",
|
"qualifiedName": "body",
|
||||||
"className": getClassName("kcBodyClass")
|
"className": bodyClassName ?? getClassName("kcBodyClass")
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -17,6 +17,7 @@ export type TemplateProps<KcContext extends KcContext.Common, I18nExtended exten
|
|||||||
socialProvidersNode?: ReactNode;
|
socialProvidersNode?: ReactNode;
|
||||||
infoNode?: ReactNode;
|
infoNode?: ReactNode;
|
||||||
documentTitle?: string;
|
documentTitle?: string;
|
||||||
|
bodyClassName?: string;
|
||||||
|
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
};
|
};
|
||||||
|
@ -262,6 +262,7 @@ export declare namespace KcContext {
|
|||||||
client: string;
|
client: string;
|
||||||
clientScopesRequested: {
|
clientScopesRequested: {
|
||||||
consentScreenText: string;
|
consentScreenText: string;
|
||||||
|
dynamicScopeParameter?: string;
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
url: {
|
url: {
|
||||||
|
@ -18,18 +18,54 @@ export default function LoginOauthGrant(props: PageProps<Extract<KcContext, { pa
|
|||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, doUseDefaultCss, classes }}
|
{...{ kcContext, i18n, doUseDefaultCss, classes }}
|
||||||
headerNode={msg("oauthGrantTitle", client.name ? advancedMsgStr(client.name) : client.clientId)}
|
bodyClassName="oauth"
|
||||||
|
headerNode={
|
||||||
|
<>
|
||||||
|
{client.attributes.logoUri && <img src={client.attributes.logoUri} />}
|
||||||
|
<p>{client.name ? msg("oauthGrantTitle", advancedMsgStr(client.name)) : msg("oauthGrantTitle", client.clientId)}</p>
|
||||||
|
</>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<div id="kc-oauth" className="content-area">
|
<div id="kc-oauth" className="content-area">
|
||||||
<h3>{msg("oauthGrantRequest")}</h3>
|
<h3>{msg("oauthGrantRequest")}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{oauth.clientScopesRequested.map(clientScope => (
|
{oauth.clientScopesRequested.map(clientScope => (
|
||||||
<li key={clientScope.consentScreenText}>
|
<li key={clientScope.consentScreenText}>
|
||||||
<span>{advancedMsg(clientScope.consentScreenText)}</span>
|
<span>
|
||||||
|
{advancedMsg(clientScope.consentScreenText)}
|
||||||
|
{clientScope.dynamicScopeParameter && (
|
||||||
|
<>
|
||||||
|
: <b>{clientScope.dynamicScopeParameter}</b>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{client.attributes.policyUri ||
|
||||||
|
(client.attributes.tosUri && (
|
||||||
|
<h3>
|
||||||
|
{client.name ? msg("oauthGrantInformation", advancedMsgStr(client.name)) : msg("oauthGrantInformation", client.clientId)}
|
||||||
|
{client.attributes.tosUri && (
|
||||||
|
<>
|
||||||
|
{msg("oauthGrantReview")}
|
||||||
|
<a href={client.attributes.tosUri} target="_blank">
|
||||||
|
{msg("oauthGrantTos")}
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{client.attributes.policyUri && (
|
||||||
|
<>
|
||||||
|
{msg("oauthGrantReview")}
|
||||||
|
<a href={client.attributes.policyUri} target="_blank">
|
||||||
|
{msg("oauthGrantPolicy")}
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</h3>
|
||||||
|
))}
|
||||||
|
|
||||||
<form className="form-actions" action={url.oauthAction} method="POST">
|
<form className="form-actions" action={url.oauthAction} method="POST">
|
||||||
<input type="hidden" name="code" value={oauth.code} />
|
<input type="hidden" name="code" value={oauth.code} />
|
||||||
<div className={getClassName("kcFormGroupClass")}>
|
<div className={getClassName("kcFormGroupClass")}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user