Repository navigation
v1.98.1 - Amansinaya
[1.98.1] - 2026-12-04 — Amansinaya
API-key requests through the auth middleware.
Fixed
- An
X-API-Keyheader alone authenticates through theauthmiddleware. The middleware's
credential check looked only for a Bearer token (or the opt-in query token) before running the
providers, so a request carrying onlyX-API-Key, orAuthorization: ApiKey <key>, was refused
with "Authentication required" even though theapi_keyprovider reads both. Whenapi_keyis
among the middleware's providers, those sources (and?api_key=when
security.api_keys.allow_query_paramis on) now count as credentials. An unknown key now gets
"Invalid credentials" rather than "Authentication required". - API-key requests get
auth.user.uuid. It was set only by the auth enricher, from the
session or JWT, so key requests hadauth.userbut noauth.user.uuid. The middleware now
fills it from the authenticated identity when the enricher didn't.
Added
ApiKeyAuthenticationProvider::apiKeyFromRequest(Request, bool $allowQueryParam): the key a
request carries, from the sources the provider reads.