Skip to content

a simple flask authentication API with SQLite3 database management and RSA encrypted passwords

Notifications You must be signed in to change notification settings

Zenaker/flask-authentication-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flask-authentication-api

a simple flask authentication API with SQLite3 database management and RSA encrypted passwords

P.S change the public and private keys in the database/encryption folder :)

API Calls

Register

  • Register an account in the database

Send a POST request to /auth/register to register your account with the following parameters:

Parameter Value
username String: the account's username
email String: the account's email
password String: the account's password

Example request

POST /auth/register HTTP/1.1

username=test_username&[email protected]&password=password123

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "success"
}

Error Response

HTTP/1.1 404
Content-Type: application/json

{
  "error":"error message"
}

Login

  • Sign in the account

Send a POST request to /auth/login to sign in your account with the following parameters:

Parameter Value
email String: the account's email
password String: the account's password

Example request

POST /auth/login HTTP/1.1

[email protected]&password=password123

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "status": "success"
}

Error Response

HTTP/1.1 404
Content-Type: application/json

{
  "error":"error message"
}

About

a simple flask authentication API with SQLite3 database management and RSA encrypted passwords

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages