Adds two helpers tailored for cron-driven or watcher-style clients:
- AuthenticateContext(ctx) — cancellable variant of Authenticate(). Bypasses
the non-context Query() path and POSTs /api/2.0/authentication.json directly,
so a stalled auth call never outlives the caller's deadline.
- InvalidateToken() — zeroes the cached *Token. Next request (or Authenticate*)
forces a fresh auth. Intended for mid-sync 401 recovery when the server has
revoked/rotated the session while local Expires still looks fresh.
Plain Authenticate() is unchanged; it remains a convenience wrapper.
Unit tests cover cache-hit, forced refresh, and context-cancellation paths.
Refs eSlider/inventar-sync#3, ASR-0008.
Made-with: Cursor
Four new executable examples mirror the oo-cli subcommands at library level so
downstream Go consumers can see the typed API without reading the CLI wiring.
README table updated to list all examples.
Made-with: Cursor