Files
pad/internal/server
xarmian f3bbc9d7de feat(oauth): refuse a grant without an RFC 8707 resource (TASK-3363 phase 2)
/oauth/authorize and /oauth/authorize/decide now refuse a request that names
no resource with invalid_target, after fosite parses it, so the error reaches
the client at its redirect_uri with its state (RFC 6749 §4.1.2.1). Defaulting
the resource there is what let a DCR client replay a token cross-server.

The token endpoint is NOT refused (lead ruling, day 90): RFC 8707 makes
resource optional there, the code or refresh token is bound to the audience
its authorization granted, and fosite holds the requested audience to it. A
new test proves a ChatGPT-granted code exchanged without resource still yields
a token refused at /mcp. A refresh refusal would silently sign users out.
The token endpoint keeps the phase-1 default and counter.

The counter and WARN stay at every endpoint. fosite has no invalid_target, so
the RFC6749Error is built here. Tests: phase-1 tests rewritten to the refusal;
the 2026-05 DefaultsToCanonical test becomes RefusesNoResource; fixtures that
minted without resource now name the canonical one. Mutants: dropping either
refusal fails two tests.

Claude-Session: https://claude.ai/code/session_01Q9WssCjFuHjSfLABoW4tmS
2026-11-02 21:25:41 +00:00
..