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

User session system #588

Merged
merged 9 commits into from
Jun 23, 2021
Merged

User session system #588

merged 9 commits into from
Jun 23, 2021

Conversation

schneijan
Copy link
Member

@schneijan schneijan commented May 31, 2021

Removes the previous http-auth-based login system in favor of a session-based system. Core features:

  • On login, user sessions with unique session IDs are generated and stored in the MongoDB
  • No session state is kept on the server, instead everything is stored in the MongoDB ("stateless")
  • For performance reasons, a local cache on server remembers session IDs and associated users for a TTL of one minute
  • MongoDB repository and local cache are updated accordingly on logout of a user
  • Sessions expire automatically seven days after creation
  • Users with missing or invalid sessions are redirected to the login page
  • Username and password do not need to be sent with every server request anymore

Closes #571

@schneijan schneijan requested a review from hirmerpl May 31, 2021 23:43
@schneijan
Copy link
Member Author

Fixed issue with non-https cookies.

@schneijan
Copy link
Member Author

The API wiki page now describes how authentication works when using the REST API directly.

@hirmerpl hirmerpl merged commit aab55d6 into master Jun 23, 2021
@hirmerpl hirmerpl deleted the user_sessions branch June 23, 2021 07:54
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.

Transform user system to sessions
2 participants