As shown in the token interaction with tasks, task interactions starts with getting a task token, and then may ask for an answer token or a hint request token, both given a task token.
For these 2 requests, both the usual access token and the task token are provided. However, other agents than the frontend may need to use these services. A CLI is planned as well. It is better if these external tools do not need the access token.
Subtasks
For the POST /answers (generate an answer token) and POST /items/ask-hint (Register a hint request) services:
[x] do not require nor use the access token
[x] make sure you fully validate the task token, i.e. the signature and that the date is either today or yesterday)
[x] Update service spec
[x] Make sure you test both the cases where UserID = and != ParticipantId
Motivations
As shown in the token interaction with tasks, task interactions starts with getting a task token, and then may ask for an answer token or a hint request token, both given a task token.
For these 2 requests, both the usual access token and the task token are provided. However, other agents than the frontend may need to use these services. A CLI is planned as well. It is better if these external tools do not need the access token.
Subtasks
For the
POST /answers
(generate an answer token) andPOST /items/ask-hint
(Register a hint request) services: