Expand description
Handlers for HTTP requests to /api/v0/auth.
StructsΒ§
- Auth
Routes ApiDoc - 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_
duplicate_ πemail_ error_ message - 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 the system. 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.