Module users

Module users 

Source
Expand description

Handlers for HTTP requests to /api/v0/tmc-server/users/.

Exposes three endpoints used exclusively by the TMC server, all of which require a valid shared-secret authorization header:

  • POST /create – fetches user details from tmc.mooc.fi, creates the user in this system if they don’t exist, sets the provided password, and notifies TMC that password management has moved to courses.mooc.fi.
  • POST /authenticate – verifies a user_id/password pair against the locally stored hash.
  • POST /change-password – updates the stored password hash, optionally verifying the old one first.

Structs§

CreateUserRequest
CreateUserResponse
LoginRequest
PasswordChangeRequest

Functions§

_add_routes
courses_moocfi_password_change
POST /api/v0/tmc-server/users/change-password
courses_moocfi_password_login
POST /api/v0/tmc-server/users/authenticate
create_user
POST /api/v0/tmc-server/users/create