API tokens
Overview
Bearer API tokens in apitokens authenticate neo routes. A token with exp in the past is rejected.
How it works
AuthService.getApiTokenUser loads the token, then throws before the user is loaded when exp is a past date. The authorization middleware returns 401. exp null or absent stays valid. Neo does not delete the row; the legacy API deletes on its own path.
Key files
src/core/auth/auth.service.ts— expiry check on API token lookupsrc/core/auth/auth.service.spec.ts— past, null, and missingexp
Technical decisions
- Shared
apitokenscollection with the legacy API. Neo only refuses the request.
Known issues
- A token with no
expnever expires on this path.
Next steps
- Align delete-on-expiry with the legacy API if both services must drop the row