Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Authenticates Guidewire Cloud API integrations via OAuth2 client credentials, covering token caching, JVM trust stores and secret rotation.
Use this skill ↓32% 73%+41 ptsof test cases passed
Passed 16 of 22 test cases with the skill, and 7 of 22 without it.
We are setting up token caching for a Guidewire Cloud API integration. Should we store the token for a fixed 3500 seconds after receipt, or how should we schedule proactive refreshes to prevent latency spikes during high load?
Uses the JWT exp claim timestamp for TTL calculation.
3 of 3 safety checks passed
Authenticate a backend service to a Guidewire Cloud tenant using OAuth2 client credentials and operate the auth layer in production. This is not a hello-world walkthrough; it is the auth code your service runs at 3am when a token expires mid-batch, when a tenant admin rotates a scope, when a private CA renews a cert, and when on-call needs to swap a leaked secret without dropping in-flight requests.
The four production failures this skill prevents:
403, retrying does not help.202503 and later)*.guidewire.net (runtime APIs) and gcc.guidewire.com (console only)Build the auth layer in this order. Each section solves one production failure mode; do not skip steps because the failure shows up in production, not in dev.
Tokens are short-lived, typically one hour. Reactive refresh on 401 is wrong: it doubles latency on the failing request and creates a thundering herd when many requests notice expiry simultaneously. Cache the token in-process and refresh proactively at 80% of TTL, behind a single-flight gate so concurrent refreshers serialize.
import jwt from "jsonwebtoken";
type Cached = { value: string; expiresAt: number };
let cached: Cached | null = null;
let inflight: Promise<string> | null = null;
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.