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.
- Verify
Email Request
Enumsยง
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_
email_ ๐verification - 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 LoginResponse indicating success, email verification required, or failure. - 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. - verify_
email - POST
/api/v0/auth/verify-emailVerifies email verification code and completes login.