fix(coreapi): honor exchange expires_in when caching exchanged tokens

main

Commit

toothbrush3mo ago

storeToken always used the fixed 4m cachedTokenTTL and discarded the expires_in PostOAuthToken returns. A server token shorter than 4m could be served stale, producing a 401 the cache assumed impossible. Thread expires_in through and cache for min(expires_in - buffer, cachedTokenTTL), declining to cache lifetimes shorter than the buffer.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 1edf9ab1ef2c

Checkpoints

Review PR Comments on Cross-Jurisdiction Routing

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1