Repository navigation
v0.8.2
Added
- Configurable grace period for online validation: New
grace_period(Rust) /gracePeriod(TS) client option controls how long a cached token is trusted when the server is unreachable duringvalidate_online()/validate({ online: true }). Default: 24 hours. Based on JWTiatclaim.
Changed
validate_online()returnsOfflineValidateResultwith claims: Previously returned a separateValidateResulttype without claims, forcing callers to decode the token separately. Now returns the same type asvalidate()andsync(), withclaims,reason, and full local validation (signature, issuer, device, expiration) before the server call.validate_online()grace period on server unreachable: Instead of immediately returningvalid: falsewhen the server can't be reached, the SDK now trusts the cached token if it was issued within the grace period window.sync()uses single/refreshround trip: Previously called/validatethen conditionally/refresh(two requests). Now calls/refreshdirectly, which validates and returns fresh claims in one call. Also distinguishes network errors (offline fallback) from server rejections (revoked/invalid).- Removed
ValidateResulttype from both SDKs: Was redundant withOfflineValidateResultand was dead code in the TypeScript SDK (defined but never returned by any method).
Full Changelog: v0.8.1...v0.8.2