Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const generateStableKey = (kid: string | undefined, index: number): string => {
return kid || `jwk-${index}`
}

/**
* Render the JSON Web Key Set (JWKS) section, handling loading, error, and empty states.
*
* @returns The component's React element containing the JWKS section: a loading wrapper while fetching, an error alert if loading fails, the list of JWK items when present, or an informational alert when no keys are found.
*/
function JwkListPage(): React.ReactElement {
const { t } = useTranslation()
const { jwks, isLoading, error } = useJwkApi()
Expand Down Expand Up @@ -58,4 +63,4 @@ function JwkListPage(): React.ReactElement {

JwkListPage.displayName = 'JwkListPage'

export default JwkListPage
export default JwkListPage
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { useTranslation } from 'react-i18next'
import SetTitle from 'Utils/SetTitle'
import applicationStyle from 'Routes/Apps/Gluu/styles/applicationstyle'

/**
* Render the public keys configuration page, set the page title, and display the JWK list inside a tab.
*
* @returns A React element containing a Card with a tabbed JWK list and the page title set to the localized "public keys" title.
*/
function KeysPage(): React.ReactElement {
const { t } = useTranslation()
SetTitle(t('titles.public_keys'))
Expand All @@ -27,4 +32,4 @@ function KeysPage(): React.ReactElement {

KeysPage.displayName = 'KeysPage'

export default KeysPage
export default KeysPage
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import { useCallback } from 'react'
import { useNavigate } from 'react-router-dom'
import { ROUTES } from '../constants'

/**
* Provides actions related to JWK configuration, including navigation to the keys list.
*
* @returns An object with `navigateToKeysList` — a function that navigates to the keys list route.
*/
export function useJwkActions() {
const navigate = useNavigate()

Expand All @@ -12,4 +17,4 @@ export function useJwkActions() {
return {
navigateToKeysList,
}
}
}