Summary
Expired token rejections are currently silent beyond the 401 response. A warn-level log on each expired token attempt would help operators identify wallets that are not refreshing tokens correctly and detect patterns of replayed or stale credentials.
Scope
- Emit a warn-level log when a request is rejected due to an expired JWT with fields:
wallet, expired_at, expired_seconds_ago, endpoint, ip_address
expired_seconds_ago is the difference between now and the token's exp claim in seconds
- Log emitted once per rejected request, not per middleware layer
- Do not log the raw token string
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
Expired token rejections are currently silent beyond the 401 response. A warn-level log on each expired token attempt would help operators identify wallets that are not refreshing tokens correctly and detect patterns of replayed or stale credentials.
Scope
wallet,expired_at,expired_seconds_ago,endpoint,ip_addressexpired_seconds_agois the difference betweennowand the token'sexpclaim in secondsAcceptance Criteria
expired_seconds_agocorrectly computed and always positiveETA: 12 hours
Coordinate on Telegram