Skip to content

Commit

Permalink
add a description of the login process
Browse files Browse the repository at this point in the history
  • Loading branch information
klifish committed Jan 8, 2024
1 parent fbbc6a4 commit 4c3be0c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ You can access with [LUCE API](https://documenter.getpostman.com/view/18666298/2
> Once logged in, you can get a token which is necessary for later operation
3. Step 3: upload data

For more details, please refer to [Understanding the Login Related Process](./manual/understanding%20the%20login%20related%20process.md)

## Document

You can access [LUCE document](https://maastrichtu-ids.github.io/DecentralizedHealthcareBackend/) for details.
Expand Down
22 changes: 22 additions & 0 deletions manual/understanding the login related process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Understanding the Login Related Process

## 1. Registration

1.1 **Initial Setup**

> To initiate the login process, new users must first complete the registration. Essential details required are username, email, and password. For a more comprehensive profile, additional information outlined in the [create_user](https://maastrichtu-ids.github.io/DecentralizedHealthcareBackend/accounts.html#accounts.models.UserManager.create_user) interface may be provided.
1.2 **Submission and Account Creation**

> The collected registration data should be submitted to the endpoint: `http://ip_address:port/user/register`. Upon submission, LUCE processes this information to establish a [User](https://maastrichtu-ids.github.io/DecentralizedHealthcareBackend/accounts.html#accounts.models.User) instance in the database. Concurrently, an Ethereum account, comprising a private and public key, is created for each user, facilitating interactions with the Ethereum blockchain.
## 2. Login

2.1 **Accessing the System**
Post-registration, users are enabled to log in. The login credentials, specifically the username (which is the registered email address) and password, must be sent to `http://ip_address:port/user/login`. LUCE authenticates these credentials and, upon successful validation, issues a token to the user.

## 3. Updating user profile

3.1 **Profile Modification**

> Users can update their profile by sending a request to `http://ip_address:port/user/authenticated/update`. This request should include the details intended for modification.

0 comments on commit 4c3be0c

Please sign in to comment.