Skip to content
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

feat(inspector-ui): authentication support #70

Merged
merged 8 commits into from
Mar 7, 2024
Merged

feat(inspector-ui): authentication support #70

merged 8 commits into from
Mar 7, 2024

Conversation

shouya
Copy link
Owner

@shouya shouya commented Mar 7, 2024

Fixes #56.

This pull request implements authentication support with a very simple login page:

You can specify a username and password in the config to protect the inspector UI behind the login page:

auth:
  username: admin
  password: hunter2

endpoints:
  - ...

If the auth config is not specified, authentication will be disabled and the inspector UI is accessible publicly.

Note: the login feature is implemented in a very primitive way for the sake of the simplicity. Only one single user can be logged in at the same time. This means if if you try to log in from another browser, the existing session will be invalidated. Also, there is no session expiration mechanism. To log out, use the "Logout" button from the inspector UI, or simply clear your cookie.

@shouya shouya merged commit d6ae9a0 into master Mar 7, 2024
2 checks passed
@shouya shouya deleted the support-login branch March 7, 2024 14:39
@shouya shouya mentioned this pull request Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Authentication for UI
1 participant