GithubHelp home page GithubHelp logo

gauravkr07 / authentication-assignment- Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 91 KB

In this,we use authentication process and also authorization process by using concept of Python,MongoDB and FastAPI

Python 100.00%
python fastapi mongodb auth0

authentication-assignment-'s Introduction

Authentication-Assignment-

Aim:

  Authentication system in endpoint of FastAPI .

Requirements:

  • python3
  • pip
  • FastAPI
  • Uvicorn server
  • python libraries:
    • Pydantic
    • pymongo
    • passlib.context
    • fastapi.security
    • config module(containing environment variable)
    • jose
    • datetime
  • MongoDB
  • git

To run the application on your local machine:

1. Clone the repository:

    git clone "https://github.com/Gauravkr02/Authentication-Assignment-"

2. Change the directory into the repository:

    cd ./`Authentication-Assignment-'

3. Create python virtual environment

    python3 -m venv ./ver_env

4. Install python requirements:

    pip install -r requirements.txt

5. To execute, Open the pycharm application

  • Run the main.py (We need uvicorn server to run Fastapi and need to use localhost ip with portnumber.)

    • To run this we have two mathod:-
        1. configure run by importing module uvicorn)
        1. use uvicorn comman (uvicorn main:app --reaload)
  • Check 127.0.0.1/docs by using any system browser

  • when you visit this address then you find padlock sign in corner(represent that it's locked).

6. Sign_UP At this endpint

   + where we can store data(username(in email format) and password for sign_in into MongoDB.
   + username  are in email format and password received in plain form but password stored in hash format.

7. sign_in At this endpoint

   + at first you have to enter username 
   + if username found then you have to enter password
   + Then authenticate function match username with password
   + if matched then it generate jwt token otherwise raise error.

authentication-assignment-'s People

Contributors

gauravkr07 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.