API access.
Answer 3 of 4 correctly to clear this round.
An authenticated user requests their task list. Which query keeps other users’ tasks out?
Give me a hint
Logging in identifies the caller. What connects that user to each task row?
Scope the query to the identity established by authentication. A caller can choose their own URL parameters.
Review the lessonA valid token allows task updates. Its owner tries to edit another user’s task. What should the course policy do?
$user->tokenCan('tasks:update'); // true
$user->id === $task->user_id; // falseGive me a hint
Check both what the token allows and who owns this specific task.
The update policy requires both ownership and the token ability. The ability alone cannot grant access to someone else’s record.
Review the lessonWhich response is expected for a JSON request to the protected endpoint without a token or session?
Give me a hint
Can the application identify a user yet?
Authentication must establish who is calling before the policy can decide what that person may do.
Review the lessonA forbidden update returns 403. Which further assertion catches a write that happened too early?
Give me a hint
After the request ends, what title should still be stored?
Check the protected state after the rejected request. A status assertion alone cannot tell when the write occurred.
Review the lessonRevisit the missed topics
This browser could not save your score.
My challenge recordEach answer is worth 25 points. Replays keep your highest score.