mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-11-25 09:22:39 +00:00
f3bbc9d7de
/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