-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/auth backend integration #389
base: develop
Are you sure you want to change the base?
Conversation
Test Results104 tests ±0 103 ✅ - 1 23s ⏱️ ±0s For more details on these failures, see this check. Results for commit 333a915. ± Comparison against base commit 5f4708b. |
I'm failing the ParameterEditor test. The ParameterEditor in my case, will always jump over this condition and render the 'no-parameters' template because my backend is not setup so scenario lists are not fetched which makes |
Most of the components are being reworked for the switch of the API, so this might resolve itself. We have to see, when we integrate the new API with the migrated ESID. |
Thank you for this PR, I will most likely copy this over onto this branch: https://github.com/DLR-SC/ESID/tree/feature/migrate-to-new-backend as this already has reworked most of the components and API-Requests to work with the new API. |
Description
Added trigger in application menu for toy endpoint at the new backend to demonstrate authorization functionality.
A custom request header
X-Realm
is embedded to every request in scenario API service. Because of the OAuth2.0 adapter (react-oauth2-code-pkce
) I chose, the authentication context is limited to be stored in a native react context which its content cannot be accessed when defining RTKQuery APIs (only function components can have hooks). The issue is addressed here which can be improved by migrating tokeycloak-js
, a native Keycloak adapter and writing our own store for persisting authentication context. As a result, token as to be passed every time a request is called.I don't know why I am not passing the ParameterEditor test. Locally, it is not showing on the browser either. Maybe I didn't specify a working backend URI?
Also fixed bug that logout button only clearing authentication context locally but not logout through IdP. Now after logout locally the page will redirect to Keycloak's logout endpoint.
Related Issues
I guess #206 ?
Design Decisions
Performance & Quality
Checklist
I, the author of this PR checked the following requirements for good software quality:
I, the reviewer checked the following things: