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

Additional user interfaces and APIs #17

Merged
merged 4 commits into from
Aug 20, 2023
Merged

Conversation

bbockelm
Copy link
Collaborator

This PR fleshes out a few user interfaces / APIs that should be useful for Cannon to build the initial login page:

  • "is authentication initialized?" API (/api/v1.0/origin-ui/loginInitialized) returns whether or not the admin password has been set for the origin.
  • "whoami" API (/api/v1.0/origin-ui/whoami) returns the current login status and username (if applicable)
  • Health status API (/api/v1.0/health) now reflects the status of the various components.
  • Improve the messages printed out to the terminal for the code flow.

This builds on top of #16; that should be merged first.

@bbockelm bbockelm force-pushed the ui_apis branch 2 times, most recently from 69bc0c9 to 9e67d24 Compare July 27, 2023 18:18
bbockelm added 3 commits July 28, 2023 07:55
This replaces the stub API at /api/v1.0/health with a real component
health API.  Components can self-register their status with the
metrics sub-module and have this status be reflected in the API response.
When stdout is a terminal, have the code-based registration be
more readable.
`whoami` simply returns whether the user is authenticated and, if so,
the current username.

`loginInitialized` returns whether the login service has been initialized
(if not, then the code auth needs to be performed).
Copy link
Contributor

@CannonLock CannonLock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bbockelm bbockelm merged commit 5fe1bf6 into PelicanPlatform:main Aug 20, 2023
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.

2 participants