Add login endpoints and UI scripts to use them #15
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.
Here are changes that are designed to solve issue #13.
There are also some configuration changes regarding
Server.OidcAuth
:ServiceConfigUrl
was renamed toServiceConfigURL
to follow "URL" naming convention used in other parametersRedirectURL
to specify where the user needs to be redirected after the login (application's endpoint)In general, two HTTP endpoints were added:
/login
– this redirects user to OIDC login page, or otherwise requests Basic credentials, or otherwise just redirects user back to root path when no authentication is configured./login/token
– this returns the JWT token for the frontend to use (if OIDC is not used, this response will be an empty HTTP 200). If OIDC is configured but user is not authenticated, the response will be HTTP 404.The frontend side was updated to first attempt to retrieve a token from
/login/token
. On failure, the user will be redirected to the/login
path, which initiates the login flow.Note that this login flow is possible only with the HTTP-based API and not with the gRPC API.