@itentialopensource/adapter-utils 6.1.12 → 6.1.13

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.
@@ -3169,6 +3169,11 @@ function requestAuthenticate(request, entitySchema, invalidToken, callProperties
3169
3169
  log.trace(origin);
3170
3170
 
3171
3171
  try {
3172
+ // Store original path before authentication if not already stored
3173
+ if (!request.pathBeforeAuth) {
3174
+ request.pathBeforeAuth = request.header.path;
3175
+ }
3176
+
3172
3177
  // set up the right credentials - passed in overrides default
3173
3178
  let useUser = username;
3174
3179
  let usePass = password;
@@ -3791,6 +3796,11 @@ function retryInvalidResponse(request, callProperties, myTransTime, claimedLic,
3791
3796
  log.trace(origin);
3792
3797
 
3793
3798
  try {
3799
+ // Restore original path before retry
3800
+ if (request.pathBeforeAuth) {
3801
+ request.header.path = request.pathBeforeAuth;
3802
+ }
3803
+
3794
3804
  // Need to get a new token and retry the request
3795
3805
  return requestAuthenticate(request, entitySchema, request.tokenUsed, callProperties, (mres, merror) => {
3796
3806
  if (merror) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "6.1.12",
3
+ "version": "6.1.13",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",