Update README.md

This commit is contained in:
Rodion Atamaniuc
2021-07-22 18:57:39 +03:00
committed by GitHub
parent d54b74a37c
commit c6d9f2c32b

View File

@@ -9,17 +9,19 @@ First you have to git clone the files by entering in your terminal:
``` ```
$ git clone https://github.com/AtamanKit/fastapi_users_docker.git $ git clone https://github.com/AtamanKit/fastapi_users_docker.git
``` ```
Then start the application by enterig: Then start the application:
``` ```
$ docker-compose up -d $ docker-compose up -d
``` ```
The above command will both create the images and start the containers (2 images and 2 containers - one for the application and one for the MongoDB database). The above command will both create the images and start the containers (2 images and 2 containers - one for the FastAPI application and one for the MongoDB database).
For visualizing the application, open up your browser and enter: For visualizing the application, open up your browser and enter:
* http://127.0.0.1/docs * http://127.0.0.1/docs
In the application you'll have six sections: In the application we have seven sections:
* For creating users (3 roles are acceptable only: "admin", "dev", "simple mortal"), you'll see an error if not respecting the rule; * For authentication (the right green "Authorize" button from the above);
* For creating users (3 roles are acceptable only: "admin", "dev", "simple mortal", you'll see an error if not respecting the rule);
* For creating tokens by entering user's credentials; * For creating tokens by entering user's credentials;
* For listing the users; * For listing the users;
* For watching the current user (only if authenticated); * For watching the current user (only if authenticated);
@@ -58,4 +60,4 @@ In the app directory in ```main.py``` file we make all the dependencies and rout
Authentication is made by using ```bearer``` scheme with ```token``` creation and usage. Authentication is made by using ```bearer``` scheme with ```token``` creation and usage.
```dependecies.py``` is the file containing authentication fucntions (I also made an authentication middleware located in ```main.py``` file in the root directory using ```basic``` scheme that serves only as an example purpose). ```dependecies.py``` is the file containing authentication fucntions (I also made an authentication middleware located in ```main.py``` file in the root directory using ```basic``` scheme, this function serves as an example purpose only).