@itentialopensource/adapter-utils 5.1.2 → 5.1.3

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 5.1.3 [08-28-2023]
3
+
4
+ * aws auth changes - for all aws auth
5
+
6
+ See merge request itentialopensource/adapter-utils!270
7
+
8
+ ---
9
+
2
10
  ## 5.1.2 [08-28-2023]
3
11
 
4
12
  * Resolve ADAPT-2852 - Broker authentication
@@ -53,7 +53,10 @@ class AuthenticationHandler {
53
53
  * @param {string} method - the method for the action we are setting authorization for
54
54
  * @param {object} requestObj - an object that contains all of the possible parts of the request (payload, uriPathVars,
55
55
  * uriQuery, uriOptions and addlHeaders (optional). Can be a stringified Object.
56
- * @param {string} pathBody - the path or body for the action we are setting authorization for
56
+ * @param {string} uriPath - the path for the call. (required)
57
+ * @param {string} service - the AWS service we are talking to
58
+ * @param {object} [stsParams] - STS Parameters to use for authentication.
59
+ * @param {string} [roleName] - RoleName to authenticate against
57
60
  *
58
61
  * @return {Object} the headers to add to the request
59
62
  */
@@ -147,7 +147,7 @@ class GenericHandler {
147
147
  // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
148
148
  // See if AWS call requiring authentication
149
149
  if (metadata && metadata.service) {
150
- return this.requestHandlerInst.getAWSAuthorization(restMethod, reqObj, uriPath, metadata.service, (signature, authError) => {
150
+ return this.requestHandlerInst.getAWSAuthorization(restMethod, reqObj, uriPath, metadata.service, null, null, (signature, authError) => {
151
151
  if (authError) {
152
152
  return callback(null, authError);
153
153
  }
@@ -1912,11 +1912,16 @@ class RequestHandler {
1912
1912
  *
1913
1913
  * @function getAWSAuthorization
1914
1914
  * @param {string} method - the method for the action we are setting authorization for
1915
- * @param {string} pathBody - the path or body for the action we are setting authorization for
1915
+ * @param {object} requestObj - an object that contains all of the possible parts of the request (payload, uriPathVars,
1916
+ * uriQuery, uriOptions and addlHeaders (optional). Can be a stringified Object.
1917
+ * @param {string} uriPath - the path for the call. (required)
1918
+ * @param {string} service - the AWS service we are talking to
1919
+ * @param {object} [stsParams] - STS Parameters to use for authentication.
1920
+ * @param {string} [roleName] - RoleName to authenticate against
1916
1921
  *
1917
1922
  * @return {Object} the headers to add to the request
1918
1923
  */
1919
- getAWSAuthorization(method, requestObj, uriPath, service, callback) {
1924
+ getAWSAuthorization(method, requestObj, uriPath, service, STSParams, roleName, callback) {
1920
1925
  const origin = `${this.myid}-requestHandler-getAWSAuthentication`;
1921
1926
  log.trace(origin);
1922
1927
 
@@ -1929,4 +1934,5 @@ class RequestHandler {
1929
1934
  }
1930
1935
  }
1931
1936
  }
1937
+
1932
1938
  module.exports = RequestHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "5.1.2",
3
+ "version": "5.1.3",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",
Binary file