import{prefixUrl as e}from"@clevercloud/client/esm/prefix-url.js";import{request as t}from"@clevercloud/client/esm/request.fetch.js";import{withCache as o}from"@clevercloud/client/esm/with-cache.js";import{withOptions as r}from"@clevercloud/client/esm/with-options.js";function n({authBridgeConfig:n,signal:c,cacheDelay:u,timeout:s}){return l=>{const h={...n,...l};return o(h,u,(()=>{const{AUTH_BRIDGE_HOST:o="https://api-bridge.clever-cloud.com",...u}=n;return Promise.resolve(l).then(e(o)).then(i(u)).then(r({signal:c,timeout:s})).then(t)}))}}function i(e){return function(t){const o="OAuth "+[`oauth_consumer_key="${e.OAUTH_CONSUMER_KEY}"`,`oauth_token="${e.API_OAUTH_TOKEN}"`,`oauth_signature="${e.OAUTH_CONSUMER_SECRET}%26${e.API_OAUTH_TOKEN_SECRET}"`].join(", ");return{...t,headers:{authorization:o,...t.headers}}}}export{i as addOauthHeaderPlaintext,n as sendToAuthBridge};
//# sourceMappingURL=send-to-auth-bridge.js.map
