Expand description
Handlers for HTTP requests to /api/v0/auth.
Structs§
- Create
Account Details - Login
- 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. - handle_
test_ 🔒mode_ signup - 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. - post_
new_ user_ to_ moocfi - Posts new user account to tmc.mooc.fi.
- 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.