navidrome/server/apiv1
Deluan d1b876097f refactor(api): use the grant secret as the API v1 bearer credential
API v1 no longer mints short-lived JWT access tokens. Clients send the grant
secret from POST /auth/login or /auth/setup as `Authorization: Bearer` on
every request.

Every request already looked the grant up in the database, so the JWT gave
no speed or revocation benefit and only added a refresh loop, which early
client authors pushed back on. The grant already is an API key: one per
client sign-in, scoped and revocable. Revocation is now immediate on every
node; the contract promises "within one minute".

Removed: POST /auth/token, the grantAuth scheme, the TokenRequest and
AccessToken schemas, the token_expired problem code, the API v1 JWT signer
and its signing key, the grant liveness cache, and PropertyRepository.PutIfAbsent.
ResolveGrant is now Authenticate.

Short-lived tokens return later only as narrow media tokens for
?access_token= on media URLs, together with the media endpoints.

Signed-off-by: Deluan <deluan@navidrome.org>
2026-09-28 21:05:57 -04:00
..
api.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
api_gen.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
api_test.go fix(api): consolidate grant deletes and harden API v1 auth after review 2026-09-28 20:06:28 -04:00
apiv1_suite_test.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
auth_handlers.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
auth_test.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
capabilities.go feat(api): report login methods and add GET /capabilities 2026-09-28 20:06:27 -04:00
capabilities_test.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
db_test.go feat(api): add API v1 login, setup, token, grant and password endpoints 2026-09-28 20:06:27 -04:00
dto.go refactor(api): simplify the API v1 spec gate 2026-09-28 20:06:28 -04:00
dto_test.go test(api): share API v1 test helpers and check scopes in Go 2026-09-28 20:06:28 -04:00
gate.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
gate_test.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
oapi-codegen-overlay.yaml feat(api): add API v1 login, setup, token, grant and password endpoints 2026-09-28 20:06:27 -04:00
oapi-codegen.yaml feat(api): add API v1 login, setup, token, grant and password endpoints 2026-09-28 20:06:27 -04:00
password_handlers.go fix(api): consolidate grant deletes and harden API v1 auth after review 2026-09-28 20:06:28 -04:00
problem.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
problem_test.go refactor(api): use the grant secret as the API v1 bearer credential 2026-09-28 21:05:57 -04:00
reference.go feat(api): enforce API v1 security from the spec and harden problem responses 2026-09-28 20:06:27 -04:00
server_info.go feat(api): report login methods and add GET /capabilities 2026-09-28 20:06:27 -04:00
server_info_test.go feat(api): report login methods and add GET /capabilities 2026-09-28 20:06:27 -04:00
spec.go feat(api): add the API v1 foundation behind DevAPIv1 (#6227) 2026-09-26 15:27:23 -04:00
spec_test.go feat(api): add the API v1 foundation behind DevAPIv1 (#6227) 2026-09-26 15:27:23 -04:00