Logs in to Moodle using the provided credentials and returns a token.
The base URL of the Moodle site.
The username of the user.
The password of the user.
A Promise that resolves to a token string.
An error if the HTTP response is not ok or if the JSON response contains an error message.
Generated using TypeDoc
Logs in to Moodle using the provided credentials and returns a token.