From 6728d11869fa48c2cf6d3e4d62f42f6f0e0ccca4 Mon Sep 17 00:00:00 2001 From: Dave Clarke Date: Thu, 19 Nov 2026 13:11:34 +0000 Subject: [PATCH 1/2] Document the OAuth2 token response field settings Web API 1.12.0 adds settings for token endpoints that don't return access_token and expires_in, such as Device42's token and expires. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/build-plugin/references/metadata.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.claude/skills/build-plugin/references/metadata.md b/.claude/skills/build-plugin/references/metadata.md index 362633b2c..9ab6e49f8 100644 --- a/.claude/skills/build-plugin/references/metadata.md +++ b/.claude/skills/build-plugin/references/metadata.md @@ -143,9 +143,14 @@ Token refresh is handled automatically for all OAuth2 flows. "oauth2ClientSecretLocationDuringAuth": "body", // "query" (default), "body", or "header" "oauth2SendTokenInParameters": true, // send access token as query param instead of Bearer header "oauth2TokenExtraArgs": [{ "key": "k", "value": "v" }], -"oauth2TokenExtraHeaders": [{ "key": "k", "value": "v" }] +"oauth2TokenExtraHeaders": [{ "key": "k", "value": "v" }], +"oauth2TokenResponseField": "token", // token response field holding the token, if not access_token; dot paths work ("data.token") +"oauth2ExpiresInResponseField": "lifetime", // field holding seconds until expiry, if not expires_in +"oauth2ExpiresAtResponseField": "expires" // field holding an absolute expiry time (ISO date or epoch); use instead of the seconds field ``` +Set the expiry field only when the token response has one. Without a readable expiry, the token is renewed when a request gets a 401. + OAuth URLs and scopes support `{{fieldName}}` expressions — useful when the auth URL includes a tenant ID from the user's config: ```json From 41d64db2a2bdf29ae7e84c5f11d5c720279d2754 Mon Sep 17 00:00:00 2001 From: Dave Clarke Date: Thu, 19 Nov 2026 13:21:56 +0000 Subject: [PATCH 2/2] Show one expiry setting and state the accepted expiry formats The OAuth2 example set both expiry fields without saying which wins, and the absolute expiry field didn't say which date formats it reads. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/build-plugin/references/metadata.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.claude/skills/build-plugin/references/metadata.md b/.claude/skills/build-plugin/references/metadata.md index 9ab6e49f8..76b3c1193 100644 --- a/.claude/skills/build-plugin/references/metadata.md +++ b/.claude/skills/build-plugin/references/metadata.md @@ -145,11 +145,15 @@ Token refresh is handled automatically for all OAuth2 flows. "oauth2TokenExtraArgs": [{ "key": "k", "value": "v" }], "oauth2TokenExtraHeaders": [{ "key": "k", "value": "v" }], "oauth2TokenResponseField": "token", // token response field holding the token, if not access_token; dot paths work ("data.token") -"oauth2ExpiresInResponseField": "lifetime", // field holding seconds until expiry, if not expires_in -"oauth2ExpiresAtResponseField": "expires" // field holding an absolute expiry time (ISO date or epoch); use instead of the seconds field +"oauth2ExpiresAtResponseField": "expires" // field holding an absolute expiry time (see below) ``` -Set the expiry field only when the token response has one. Without a readable expiry, the token is renewed when a request gets a 401. +The expiry comes from `expires_in` (seconds until expiry) by default. Set one of these to change where it's read from, matching what the token response returns: + +- `oauth2ExpiresInResponseField`: another field holding seconds until expiry. +- `oauth2ExpiresAtResponseField`: a field holding an absolute expiry time, as an ISO 8601 date (`2026-11-19T12:00:00Z`) or Unix epoch seconds or milliseconds. If both are set, this one wins. + +Without a readable expiry, the token is renewed when a request gets a 401. OAuth URLs and scopes support `{{fieldName}}` expressions — useful when the auth URL includes a tenant ID from the user's config: