Replace basic auth with cookie authentication #440
Merged
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.
Replaces the existing basic authentication with cookie-based authentication.
If credentials are configured and no session is active, then the UI will redirect to a login page, which consists of only the following:
(key is a Chrome addition)
Entering invalid credentials gives an error as follows:
The login operation should redirect to the page that the user was attempting to access after logging in.
Cookies are JWT based and persist through server restarts.
Added a new configuration option: Maximum Session Age. This is the maximum age - in seconds - of the session cookie before it expires. The cookie is renewed during every request, so this option represents the maximum idle time before the session is expired.
Added a logout button next to the Settings button. This button is only shown when credentials are required and the user is logged in.
Clicking on this button expires the session cookie and returns the user to the login page.
Resolves #361.