oci-common
Advanced tools
Comparing version 1.16.0 to 1.16.1
@@ -53,3 +53,3 @@ "use strict"; | ||
} | ||
else if (this.jwt.payload && this.jwt.payload.exp < secondsSinceEpoch) { | ||
else if (this.jwt.payload && this.jwt.payload.exp > secondsSinceEpoch) { | ||
return true; | ||
@@ -56,0 +56,0 @@ } |
@@ -36,2 +36,3 @@ /** | ||
private privateKeyBuffer; | ||
private privateKey; | ||
/** | ||
@@ -38,0 +39,0 @@ * Construct an instance of [[DefaultRequestSigner]]. |
@@ -56,2 +56,3 @@ "use strict"; | ||
this.delegationToken = ""; | ||
this.privateKey = ""; | ||
let options = {}; | ||
@@ -71,2 +72,3 @@ if (this.authenticationDetailsProvider.getPassphrase()) { | ||
} | ||
this.privateKey = this.authenticationDetailsProvider.getPrivateKey(); | ||
this.privateKeyBuffer = sshpk_1.parsePrivateKey(this.authenticationDetailsProvider.getPrivateKey(), "auto", options).toBuffer("pem", {}); | ||
@@ -132,3 +134,8 @@ } | ||
const keyId = yield this.authenticationDetailsProvider.getKeyId(); | ||
this.privateKeyBuffer = sshpk_1.parsePrivateKey(this.authenticationDetailsProvider.getPrivateKey(), "auto", options).toBuffer("pem", {}); | ||
// Check if privateKey exists or if the authenticationDetailsProvider's private key have changed. | ||
let authPrivateKey = this.authenticationDetailsProvider.getPrivateKey(); | ||
if (!this.privateKey || this.privateKey !== authPrivateKey) { | ||
this.privateKey = authPrivateKey; | ||
this.privateKeyBuffer = sshpk_1.parsePrivateKey(authPrivateKey, "auto", options).toBuffer("pem", {}); | ||
} | ||
httpSignature.sign(new SignerRequest(request.method, request.uri, request.headers), { | ||
@@ -135,0 +142,0 @@ key: this.privateKeyBuffer, |
{ | ||
"name": "oci-common", | ||
"version": "1.16.0", | ||
"version": "1.16.1", | ||
"description": "OCI Common module for NodeJS", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
424525
5151