@nsshunt/stsoauth2plugin 1.0.114 → 1.0.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5089,20 +5089,39 @@ class STSAxiosConfig {
5089
5089
  __privateSet2(this, _timeout, timeout);
5090
5090
  }
5091
5091
  }
5092
+ withCookies(cookies) {
5093
+ if (!__privateGet2(this, _headers)) {
5094
+ __privateSet2(this, _headers, {});
5095
+ }
5096
+ __privateGet2(this, _headers)["Cookie"] = cookies.join("; ");
5097
+ return this;
5098
+ }
5092
5099
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5093
5100
  withData(data) {
5094
5101
  __privateSet2(this, _data, data);
5095
5102
  return this;
5096
5103
  }
5097
5104
  // 'Content-Type': 'application/json'
5105
+ withAuthHeaders(accesssToken, stsUserId) {
5106
+ if (!__privateGet2(this, _headers)) {
5107
+ __privateSet2(this, _headers, {});
5108
+ }
5109
+ __privateGet2(this, _headers)["Content-Type"] = "application/json";
5110
+ __privateGet2(this, _headers)["Authorization"] = "Bearer " + accesssToken;
5111
+ if (stsUserId) {
5112
+ __privateGet2(this, _headers)["x-sts_user_id"] = stsUserId;
5113
+ }
5114
+ return this;
5115
+ }
5098
5116
  withHeaders(headers) {
5099
5117
  __privateSet2(this, _headers, headers);
5100
5118
  return this;
5101
5119
  }
5102
5120
  withDefaultHeaders() {
5103
- __privateSet2(this, _headers, {
5104
- "Content-Type": "application/json"
5105
- });
5121
+ if (!__privateGet2(this, _headers)) {
5122
+ __privateSet2(this, _headers, {});
5123
+ }
5124
+ __privateGet2(this, _headers)["Content-Type"] = "application/json";
5106
5125
  return this;
5107
5126
  }
5108
5127
  withCredentials() {