polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
16 stars 7 forks source link

Well known required #456

Closed bitfl0wer closed 8 months ago

bitfl0wer commented 8 months ago

Title: Add User Authentication Feature

Description:

This pull request introduces user authentication functionality to our web application. The main goal of this feature is to ensure that each action performed on the platform is tied to a valid, logged-in user, thus providing accountability and maintaining data security.

Changes:

New models: Added the User model to represent users in our system. This model includes fields: username, password_hash, email etc.

User seriliazer and views: Implemented serializers and API views for user registration, login, and logout.

Authentication Middlewares: Added middlewares to check for a valid session or token before allowing access to certain views.

Tests: Included comprehensive test coverage for the new feature. Tests were implemented to verify user registration, login, and logout functionality, as well as checking authentication enforcement on applicable views.

Documentation: Updated API documentation related to User endpoints.

This feature is expected to improve the overall security of our application by properly managing user sessions and actions.

Note: You will see references to some helper tools like make_password and check_password methods, these are security measures to ensure we are not storing plain text passwords in the database.

This PR follows our Python coding standards and is fully linted and tested.

Requesting review and feedback. If all points are clear and no issues are detected during the review, we would appreciate it if this PR could be merged at the earliest convenience.

Related Issue: #123