Expand description
Handlers for HTTP requests to /api/v0/auth.
Structs§
- Create
Account Details - Email
Code - Login
- Send
Email Code Data - User
Info - Generic information about the logged in user.
Functions§
- _add_
routes - authorize_
action_ on_ resource - POST
/api/v0/auth/authorizechecks whether user can perform specified action on specified resource. - authorize_
multiple_ actions_ on_ resources - POST
/api/v0/auth/authorize-multiplechecks whether user can perform specified action on specified resource. Returns booleans for the authorizations in the same order as the input. - delete_
user_ account - POST
/api/v0/auth/delete-user-accountIf users single-use code is correct then delete users account - handle_
production_ 🔒login - handle_
test_ 🔒mode_ login - handle_
test_ 🔒mode_ signup - handle_
uuid_ 🔒login - is_
user_ global_ admin - logged_
in - GET
/api/v0/auth/logged-inReturns the current user’s login status. - login
- POST
/api/v0/auth/loginLogs in to TMC. Returns true if login was successful, false if credentials were incorrect. - logout
- POST
/api/v0/auth/logoutLogs out. - send_
delete_ user_ email_ code - POST
/api/v0/auth/send-email-codeIf users password is correct, sends a code to users email for account deletion - signup
- POST
/api/v0/auth/signupCreates new mooc.fi account and signs in. - update_
user_ information_ to_ tmc - user_
info - GET
/api/v0/auth/user-infoReturns the current user’s info.