Skip to content

Commit

Permalink
Add doc team suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmadhavig committed Oct 8, 2024
1 parent 5be8d4b commit abe3467
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 22 deletions.
8 changes: 8 additions & 0 deletions features/admin.applications.v1/pages/application-edit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,11 @@
.banner-wrapper {
margin-bottom: 20px;
}

.banner-view-hide-details {
min-width: 120px;
}

.banner-action {
margin: 0 0 1.5em 0 !important;
}
44 changes: 31 additions & 13 deletions features/admin.applications.v1/pages/application-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import Alert from "@oxygen-ui/react/Alert";
import AlertTitle from "@oxygen-ui/react/AlertTitle";
import Box from "@oxygen-ui/react/Box";
import Button from "@oxygen-ui/react/Button";
import Grid from "@oxygen-ui/react/Grid";
import List from "@oxygen-ui/react/List";
Expand Down Expand Up @@ -561,8 +562,9 @@ const ApplicationEditPage: FunctionComponent<ApplicationEditPageInterface> = (
severity="warning"
action={
(
<div>
<Box display="flex">
<Button
className="banner-view-hide-details"
data-componentid={ `${componentId}-outdated-app-view-details-button` }
onClick={ () => setViewBannerDetails(!viewBannerDetails) }>
{
Expand All @@ -587,7 +589,7 @@ const ApplicationEditPage: FunctionComponent<ApplicationEditPageInterface> = (
data-componentid={ `${componentId}-close-btn` }
/>
</Button>
</div>
</Box>
)
}
>
Expand Down Expand Up @@ -636,22 +638,27 @@ const ApplicationEditPage: FunctionComponent<ApplicationEditPageInterface> = (
<Trans
i18nKey={
t("applications:forms.inboundOIDC.sections"
+ ".outdatedApplications.fields."
+ "versions.version100.useClientIdAsSubClaimOfAppTokens.instruction")
+ ".outdatedApplications.fields.versions.version100."
+ "removeUsernameFromIntrospectionRespForAppTokens.instruction")
}
/>
>
The <code>sub</code> attribute of an application access token now
returns the <code>client_id</code> generated for the application,
instead of the <code>userid</code> of the application owner.
</Trans>
</Typography>
<DocumentationLink
link={
getLink("develop.applications.editApplication.outdatedApplications."
+ "versions.version100.useClientIdAsSubClaimOfAppTokens.documentationLink")
+ "versions.version100.removeUsernameFromIntrospectionRespForAppTokens."
+ "documentationLink")
}
showEmptyLink={ false }
>
<Trans
i18nKey={
t("applications:forms.inboundOIDC.sections"
+ ".outdatedApplications.documentationHint")
+ ".outdatedApplications.documentationHint")
}
/>
</DocumentationLink>
Expand All @@ -672,23 +679,26 @@ const ApplicationEditPage: FunctionComponent<ApplicationEditPageInterface> = (
<Trans
i18nKey={
t("applications:forms.inboundOIDC.sections"
+ ".outdatedApplications.fields.versions.version100."
+ "removeUsernameFromIntrospectionRespForAppTokens.instruction")
+ ".outdatedApplications.fields.versions"
+ ".version100.useClientIdAsSubClaimOfAppTokens.instruction")
}
/>
>
The introspection responses for application access tokens no longer
return the <code>username</code> attribute.
</Trans>
</Typography>
<DocumentationLink
link={
getLink("develop.applications.editApplication.outdatedApplications."
+ "versions.version100.removeUsernameFromIntrospectionRespForAppTokens."
+ "documentationLink")
+ "versions.version100.useClientIdAsSubClaimOfAppTokens."
+ "documentationLink")
}
showEmptyLink={ false }
>
<Trans
i18nKey={
t("applications:forms.inboundOIDC.sections"
+ ".outdatedApplications.documentationHint")
+ ".outdatedApplications.documentationHint")
}
/>
</DocumentationLink>
Expand All @@ -698,6 +708,14 @@ const ApplicationEditPage: FunctionComponent<ApplicationEditPageInterface> = (
}
</List>
</Grid>
<Typography variant="body2" className="banner-action">
<Trans
i18nKey={
t("applications:forms.inboundOIDC.sections"
+ ".outdatedApplications.alert.action")
}
/>
</Typography>
<Button
variant="contained"
type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class ApplicationManagementUtils {
public static isApplicationOutdated(applicationVersion: string, grantTypes?: string[]): boolean {

if (applicationVersion != undefined
&& grantTypes.includes(ApplicationManagementConstants.CLIENT_CREDENTIALS_GRANT)) {
&& grantTypes.includes(ApplicationManagementConstants.CLIENT_CREDENTIALS_GRANT)) {

const appVersionArray: number[] = applicationVersion?.match(/\d+/g).map(Number);
const latestAppVersionArray: number[] = ApplicationManagementConstants
Expand Down
3 changes: 1 addition & 2 deletions modules/i18n/src/models/namespaces/applications-ns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,13 +1378,12 @@ export interface ApplicationsNS {
};
};
outdatedApplications: {
heading: string;
alert : {
title: string;
content: string;
viewButton: string;
hideButton: string;
cancelButton: string;
action: string;
}
label: string;
documentationHint: string;
Expand Down
14 changes: 8 additions & 6 deletions modules/i18n/src/translations/en-US/portals/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1644,13 +1644,12 @@ export const applications: ApplicationsNS = {
heading: "ID Token"
},
outdatedApplications: {
heading: "Legacy Application Tokens",
alert : {
title: "Application is outdated.",
content: "This application is using an outdated behavior of applications.",
title: "Update Required.",
content: "We have updated the behavior of applications as follows.",
viewButton: "View Details",
hideButton: "Hide Details",
cancelButton: "Ignore Once"
action: "Before updating your application, be sure to update any usages of these attributes accordingly."
},
label: "Outdated",
documentationHint: "More Details",
Expand All @@ -1665,10 +1664,13 @@ export const applications: ApplicationsNS = {
versions: {
version100: {
removeUsernameFromIntrospectionRespForAppTokens: {
instruction: "The introspection response for an application access token will not include the username attribute."
instruction: "The <1>sub</1> attribute of an application access token now returns the "
+ "<3>client_id</3> generated for the application, instead of the <5>userid</5> of "
+ "the application owner."
},
useClientIdAsSubClaimOfAppTokens: {
instruction: "The sub attribute of the application access token will be the client_id generated for the application."
instruction: "The introspection responses for application access tokens no longer "
+ "return the <1>username</1> attribute."
}
}
}
Expand Down

0 comments on commit abe3467

Please sign in to comment.