Add login component first step#45
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #45 +/- ##
==========================================
- Coverage 91.13% 90.58% -0.56%
==========================================
Files 16 17 +1
Lines 316 393 +77
Branches 101 137 +36
==========================================
+ Hits 288 356 +68
- Misses 25 33 +8
- Partials 3 4 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds the login-server UI integration.
The app now reads login settings from
config.json. If login is configured, itconnects to the login server and shows the login/user status widget in the
navbar.
How it works
The config store now also loads a
loginobject fromconfig.json.In
src/main.js, the app startup was moved into an asyncbootstrap()function. This was changed because the login client needs runtime config before it can
connect. The login server URL is not hardcoded in the bundle. It comes from
config.json, so the app now waits for the config store to load before callingLogin.connect(...)and before mounting Vue.The navbar reads the same config store. When login is enabled, it shows the
UserStatuscomponent fromgbv-login-client-vue.src/stores/config.jswas changed for the same reason. It now keeps the loadedlogin config, exposes
loginEnabled, and tracks whether config loading isalready finished or in progress.
What changed
gbv-login-client-vuepublic/config.jsonanddocker/config.jsonNot included
This PR only adds the login UI and user status display.
The login currently does not change JSKOS API requests. Requests are still sent
without a login token.
Passing the login token to the JSKOS API client is only needed for authenticated
API actions, such as create, update, or delete operations. That can be handled in
a separate follow-up PR if the backend requires it.
Open question
The current login server URL is
bartoc.org/login/. This follows the setup usedin the BARTOC integration, but I am not sure yet if this is the final login
server that should be used for
jskos-server-ui.