-
Copy into
local/jwttomoodletoken
directory. -
Create a role with the
local/jwttomoodletoken:usews
capability. -
Create a user and assign it this role in the system context.
-
In Moodle's admimnistration, chose Web Services > Manage Tokens, and create a token for this user โ if needed use IP address restriction.
-
Configure jwttomoodletoken plugin. Here you can specify public key or JSON Web Key Sets URI. If URL is provided, public key is not used for decoding.
Try for instance this to request a mobile token for a given access token:
https://your.moodle/webservice/rest/server.php?wstoken=<YOUR_TOKEN>>&wsfunction=local_jwttomoodletoken_gettoken&accesstoken=
<ACCESS_TOKEN>&moodlewsrestformat=json