oci-datasafe 2.99.0 → 2.100.1

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/lib/client.d.ts CHANGED
@@ -37,6 +37,7 @@ export declare class DataSafeClient {
37
37
  protected "_region": common.Region;
38
38
  protected _lastSetRegionOrRegionId: string;
39
39
  protected _httpClient: common.HttpClient;
40
+ protected _authProvider: common.AuthenticationDetailsProvider | undefined;
40
41
  constructor(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration);
41
42
  /**
42
43
  * Get the endpoint that is being used to call (ex, https://www.example.com).
@@ -86,6 +87,10 @@ export declare class DataSafeClient {
86
87
  * Shutdown the circuit breaker used by the client when it is no longer needed
87
88
  */
88
89
  shutdownCircuitBreaker(): void;
90
+ /**
91
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
92
+ */
93
+ closeProvider(): void;
89
94
  /**
90
95
  * Close the client once it is no longer needed
91
96
  */
package/lib/client.js CHANGED
@@ -70,6 +70,7 @@ class DataSafeClient {
70
70
  const requestSigner = params.authenticationDetailsProvider
71
71
  ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
72
72
  : null;
73
+ this._authProvider = params.authenticationDetailsProvider;
73
74
  if (clientConfiguration) {
74
75
  this._clientConfiguration = clientConfiguration;
75
76
  this._circuitBreaker = clientConfiguration.circuitBreaker
@@ -191,11 +192,21 @@ class DataSafeClient {
191
192
  this._circuitBreaker.shutdown();
192
193
  }
193
194
  }
195
+ /**
196
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
197
+ */
198
+ closeProvider() {
199
+ if (this._authProvider) {
200
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
201
+ (this._authProvider).closeProvider();
202
+ }
203
+ }
194
204
  /**
195
205
  * Close the client once it is no longer needed
196
206
  */
197
207
  close() {
198
208
  this.shutdownCircuitBreaker();
209
+ this.closeProvider();
199
210
  }
200
211
  /**
201
212
  * Reactivates a previously deactivated Data Safe target database.