Skip to content

Releases: streamcoreai/go-sdk

fixed jwt delete whip

26 Apr 14:45

Choose a tag to compare

fix: reuse JWT for WHIP DELETE in Client.Disconnect()

When the SDK is configured with TokenURL (not a static Token), the JWT
fetched during Connect() was not stored, so Disconnect() sent the WHIP
DELETE with an empty Authorization header. Servers enforcing Bearer
auth on /whip rejected the teardown with 401, and any server-side
finalization (billing, transcript persistence, usage counters) never
ran.

- Add unexported lastToken field to Client; populated in Connect()
  immediately after the token is resolved (static or fetched).
- Disconnect() now uses lastToken first, falls back to config.Token,
  and as a last resort re-fetches from TokenURL so teardown still
  authenticates.
- Clear lastToken alongside sessionURL.
- Preserve best-effort whipDelete semantics (errors ignored, 3s
  timeout).
- Add table-driven tests for Disconnect token selection covering
  static-only, TokenURL-only, both-set, neither-set, and cached-blank
  re-fetch cases.

initial publish

17 Apr 07:33

Choose a tag to compare

0.0.1

init push