Skip to content

User authentication

AuxiliumCDNG edited this page Dec 27, 2021 · 3 revisions

Authentication endpoints

This part of the api uses flask-login to authenticate users. This is done by setting a login cookie.

Registration

POST /register/

form-data:

  • username
  • email
  • password

returns either:

  • 409 (if email has already been taken)
  • 400 (if plain request was sent)
  • 200

Login/Logout

POST /login/

form-data:

  • email (the users email address)
  • password (the users password

returns either:

  • 100 (if you are already logged in)
  • 403 (there was a problem; is the user active?)
  • 401 (wrong password)
  • 404 (user not found)
  • 200

GET /logout/

returns:

  • 200
Clone this wiki locally