UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

23 lines (22 loc) • 664 B
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime"; //#region extensions/openai/openai-oauth-http.runtime.ts async function withOpenAIOAuthResponse(e, t) { const { response: n, release: r } = await fetchWithSsrFGuard(e); try { return await t(n); } finally { await r(); } } function createOpenAIAuthorizationCodeForm(e) { return new URLSearchParams({ grant_type: "authorization_code", client_id: e.clientId, code: e.code, code_verifier: e.verifier, redirect_uri: e.redirectUri, ...e.resource ? { resource: e.resource } : {} }); } //#endregion export { withOpenAIOAuthResponse as n, createOpenAIAuthorizationCodeForm as t };