-
Notifications
You must be signed in to change notification settings - Fork 6
use user Profile instead of user #4005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ghazwarhili
wants to merge
25
commits into
main
Choose a base branch
from
cleanup-apache-config-requests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
73db878
use user Profile instead of user
ghazwarhili baeeed9
fix prettier
ghazwarhili 9dd48f7
Avoid booting the full app inside the OIDC silent-renew iframe
ghazwarhili ef22603
Merge branch 'main' into cleanup-apache-config-requests
ghazwarhili a54b761
avoid loading full app bundle in silent renew iframe
ghazwarhili e4dd15c
Merge remote-tracking branch 'origin/cleanup-apache-config-requests' …
ghazwarhili c5763d4
Merge branch 'main' into cleanup-apache-config-requests
ghazwarhili cd6282a
serve a minimal HTML on the silent renew callback route
ghazwarhili 1ce33c8
Revert "serve a minimal HTML on the silent renew callback route"
ghazwarhili e03e98f
Merge branch 'main' into cleanup-apache-config-requests
ghazwarhili b347286
rabbit remarks
ghazwarhili a29740d
typo fix
ghazwarhili cb0b3bf
Merge branch 'main' into cleanup-apache-config-requests
ghazwarhili 044337b
code review remarks
ghazwarhili 75bfe03
Merge branch 'main' into cleanup-apache-config-requests
ghazwarhili 0f75bc9
code review remarks
ghazwarhili e36f369
Revert "code review remarks"
ghazwarhili 44682cc
upgrade commons-ui version
ghazwarhili 94e3d60
Merge branch 'main' into cleanup-apache-config-requests
ghazwarhili ee75d93
fix sonar issue
ghazwarhili 782e607
Merge remote-tracking branch 'origin/cleanup-apache-config-requests' …
ghazwarhili 445ac89
fix sonar issue
ghazwarhili 132e553
fix sonar issue
ghazwarhili 6e1b052
fix sonar issue
ghazwarhili 7b9e186
Merge branch 'main' into cleanup-apache-config-requests
etiennehomer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| import { useCallback, useEffect, useState } from 'react'; | ||
| import type { UserManager } from 'oidc-client-ts'; | ||
| import { | ||
| handleSilentRenewCallback, | ||
| initializeAuthenticationProd, | ||
| SilentRenewCallbackHandler, | ||
| } from '@gridsuite/commons-ui'; | ||
| import { getCachedIdpSettings } from 'services/utils'; | ||
|
|
||
| export default function SilentRenewApp() { | ||
|
ghazwarhili marked this conversation as resolved.
Outdated
|
||
| const [userManager, setUserManager] = useState<UserManager | null>(null); | ||
|
|
||
| useEffect(() => { | ||
| initializeAuthenticationProd( | ||
| () => undefined /* dispatch: unused when isSilentRenew=true */, | ||
| true /* isSilentRenew */, | ||
| getCachedIdpSettings /* reads the cache instead of fetching idpSettings.json */, | ||
| false /* isSigningCallback */ | ||
| ) | ||
| .then(setUserManager) | ||
| .catch((e) => console.error('Silent renew init failed:', e)); | ||
| }, []); | ||
|
|
||
| const handleSilentRenewCallbackClosure = useCallback(() => { | ||
| if (userManager) { | ||
| handleSilentRenewCallback(userManager); | ||
| } | ||
| }, [userManager]); | ||
|
|
||
| return ( | ||
| <SilentRenewCallbackHandler | ||
| userManager={userManager} | ||
| handleSilentRenewCallback={handleSilentRenewCallbackClosure} | ||
| /> | ||
| ); | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Copyright (c) 2020, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
|
|
||
| import { createRoot } from 'react-dom/client'; | ||
| import SilentRenewApp from './components/silent-renew-app'; | ||
|
|
||
| const container = document.getElementById('root'); | ||
| const root = createRoot(container!); | ||
|
|
||
| async function renderApp() { | ||
| if (window.location.pathname.endsWith('/silent-renew-callback')) { | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
ghazwarhili marked this conversation as resolved.
Outdated
|
||
| root.render(<SilentRenewApp />); | ||
| return; | ||
| } | ||
| await import('core-js/es/array/flat-map'); | ||
| await import('typeface-roboto'); | ||
|
ghazwarhili marked this conversation as resolved.
Outdated
|
||
| await import('@xyflow/react/dist/base.css'); | ||
| await import('./index.css'); | ||
| await import('./configure-yup-init'); | ||
| const { default: AppWrapper } = await import('./components/app-wrapper'); | ||
| root.render(<AppWrapper />); | ||
| } | ||
| renderApp().catch((error) => console.error(error)); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.