The token endpoint already refused grant types the client had not
registered, but reported it as `invalid_grant`. RFC 6749 section 5.2
reserves `invalid_grant` for an authorization grant which is "invalid,
expired, revoked, does not match the redirection URI used in the
authorization request, or was issued to another client", and defines
`unauthorized_client` for a client which "is not authorized to use this
authorization grant type".
Report the condition with the error code the specification assigns to it,
matching the device authorization endpoint.
The device authorization endpoint issued a device code to any registered
client, without checking that the client had registered the
`urn:ietf:params:oauth:grant-type:device_code` grant type. Such a client
could therefore start a device authorization flow and have the server
show an approval prompt to a user, even though the subsequent token
request was always going to be refused.
RFC 8628 section 3.2 states that, in the event of an error such as an
invalidly configured client, the device authorization endpoint responds
in the same way as the token endpoint specified in RFC 6749 section 5.2,
which defines `unauthorized_client` as "the authenticated client is not
authorized to use this authorization grant type".
Apply the same grant type check the token endpoint already performs, and
add the `unauthorized_client` error code it requires.
Fixes a potential issue where continuwuity correctly defaults to room v1
when encountering an unknown room version, but then fails to *stop*
processing when it encounters the room version it doesn't actually
understand.
These are mostly grammar fixes. Furthermore:
* docs(docker,delegation): Use `important` admonitions in some places
* docs(maintenance): Elaborate on `immutable` directive in media header
* Use 2-spaces indentation instead of 4
* Use `proxy` as network name instead of `caddy` to be consistent
* Mount Caddyfile for delegated example as well
The `configs.content` approach only works for Docker, so doing this
would be more inclusive for Podman users
Also removed Nexy's forge as it is currently limited access