Minor Changes
-
#228
d3d1c10Thanks @mattzcarey! - SimplifyclientRegistrationCallbackto be an allow-or-reject policy hook. Returningundefinedallows registration; returning an object rejects registration with optionalcode,description, andstatus. Metadata override behavior has been removed. -
#184
917fe92Thanks @Talador12! - AddclientRegistrationCallbackfor validating or rejecting dynamic client registrations before storage. Returnundefined/nothing to allow registration, or return an object to reject it. Closes #162.- Default rejection error follows RFC 7591 §3.2.2 (
invalid_client_metadata/ 400). Callbacks rejecting for non-metadata reasons (missing IAT, untrusted origin) should overridecodeandstatusexplicitly. - The
requestpassed to the callback is cloned before the library reads the body, so callbacks may consume the body (e.g. to verify a signature over the raw bytes). - Callback exceptions are caught and surfaced as
500 server_error. software_statement(RFC 7591 §3.1.1) JWTs are not processed by the library; callbacks wishing to honor them must verify the JWT and apply its claims themselves.
- Default rejection error follows RFC 7591 §3.2.2 (
Patch Changes
-
#231
624fc56Thanks @william-canva! - Bound the KV page size used when revoking existing grants during authorization. -
#224
46cf9b6Thanks @mattzcarey! - AddCache-Control: no-storeandPragma: no-cacheto OAuth responses that carry tokens, credentials, or OAuth state, matching the response examples in RFC 6749 §5.1/§5.2: token endpoint responses (success and error), dynamic client registration responses carryingclient_secret, and EMA JWT-bearer token responses. -
#207
fd6e40bThanks @EfeDurmaz16! - Tighten token endpoint client authentication parsing for RFC 6749 compliance. -
#187
a1534c4Thanks @Talador12! - Advertisefragmentinresponse_modes_supportedwhenallowImplicitFlowenables the implicittokenresponse type. RFC 8414 §2 requires authorization server metadata to list supported response modes; RFC 6749 §4.2.2 delivers implicit-flow access tokens through the redirect URI fragment. -
#188
64aa241Thanks @Talador12! - Verify client ownership on token revocation (RFC 7009 §2.1) and honortoken_type_hintfor lookup ordering. Previously any client could revoke any other client's tokens. -
#225
601f042Thanks @mattzcarey! - Validate the authorization code and requesting client before acting on a grant during the authorization code exchange.The
/tokenauthorization code grant now verifies the submitted code against the stored code hash and confirms the requesting client matches the grant's client before any single-use replay handling runs. The auth code hash is retained after exchange so that a replayed code can be verified rather than acted upon based on itsuserId:grantIdprefix alone. This ensures a code that does not match the one issued for a grant has no effect on that grant.