@asgardeo/browser 0.3.0 → 0.4.2
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/dist/__legacy__/http-client/clients/axios-http-client.d.ts +15 -6
- package/dist/__legacy__/http-client/models/http-client.d.ts +1 -1
- package/dist/__legacy__/worker/worker-core.d.ts +1 -1
- package/dist/cjs/index.js +64 -43
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +64 -43
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
|
@@ -36,9 +36,9 @@ import { HttpClientInstance, HttpClientInterface } from '../models';
|
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
38
|
export declare class HttpClient implements HttpClientInterface<HttpRequestConfig, HttpResponse, HttpError> {
|
|
39
|
-
private static
|
|
40
|
-
private static
|
|
41
|
-
private
|
|
39
|
+
private static instances;
|
|
40
|
+
private static clientInstances;
|
|
41
|
+
private isHandlerEnabled;
|
|
42
42
|
private attachToken;
|
|
43
43
|
private requestStartCallback;
|
|
44
44
|
private requestSuccessCallback;
|
|
@@ -53,11 +53,20 @@ export declare class HttpClient implements HttpClientInterface<HttpRequestConfig
|
|
|
53
53
|
*/
|
|
54
54
|
private constructor();
|
|
55
55
|
/**
|
|
56
|
-
* Returns an
|
|
56
|
+
* Returns an instance-specific HttpClient instance.
|
|
57
|
+
* Each instance ID gets its own axios instance and HttpClient to avoid state conflicts.
|
|
57
58
|
*
|
|
58
|
-
* @
|
|
59
|
+
* @param instanceId - The instance ID for multi-auth context support. Defaults to 0.
|
|
60
|
+
* @return {HttpClientInstance}
|
|
59
61
|
*/
|
|
60
|
-
static getInstance(): HttpClientInstance;
|
|
62
|
+
static getInstance(instanceId?: number): HttpClientInstance;
|
|
63
|
+
/**
|
|
64
|
+
* Destroys and cleans up an HttpClient instance.
|
|
65
|
+
* This should be called during provider teardown to prevent memory leaks.
|
|
66
|
+
*
|
|
67
|
+
* @param instanceId - The instance ID to destroy. Defaults to 0.
|
|
68
|
+
*/
|
|
69
|
+
static destroyInstance(instanceId?: number): void;
|
|
61
70
|
/**
|
|
62
71
|
* Intercepts all the requests.
|
|
63
72
|
* If the `isHandlerEnabled` flag is set to true, fires the `requestStartCallback`
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
import { AsgardeoAuthClient, AuthClientConfig } from '@asgardeo/javascript';
|
|
19
19
|
import { AuthenticationHelper, SPAHelper } from '../helpers';
|
|
20
20
|
import { WebWorkerClientConfig, WebWorkerCoreInterface } from '../models';
|
|
21
|
-
export declare const WebWorkerCore: (config: AuthClientConfig<WebWorkerClientConfig>, getAuthHelper: (authClient: AsgardeoAuthClient<WebWorkerClientConfig>, spaHelper: SPAHelper<WebWorkerClientConfig>) => AuthenticationHelper<WebWorkerClientConfig>) => Promise<WebWorkerCoreInterface>;
|
|
21
|
+
export declare const WebWorkerCore: (instanceID: number, config: AuthClientConfig<WebWorkerClientConfig>, getAuthHelper: (authClient: AsgardeoAuthClient<WebWorkerClientConfig>, spaHelper: SPAHelper<WebWorkerClientConfig>) => AuthenticationHelper<WebWorkerClientConfig>) => Promise<WebWorkerCoreInterface>;
|