@asgardeo/browser 0.1.4 → 0.1.6
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__/client.d.ts +1 -1
- package/dist/__legacy__/helpers/authentication-helper.d.ts +1 -1
- package/dist/__legacy__/models/client.d.ts +1 -1
- package/dist/__legacy__/models/http-client.d.ts +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
|
@@ -460,7 +460,7 @@ export declare class AsgardeoSPAClient {
|
|
|
460
460
|
*
|
|
461
461
|
* @preserve
|
|
462
462
|
*/
|
|
463
|
-
getAccessToken(): Promise<string>;
|
|
463
|
+
getAccessToken(sessionId?: string): Promise<string>;
|
|
464
464
|
/**
|
|
465
465
|
* This method return a Promise that resolves with the idp access token.
|
|
466
466
|
*
|
|
@@ -51,7 +51,7 @@ export declare class AuthenticationHelper<T extends MainThreadClientConfig | Web
|
|
|
51
51
|
getCrypto(): Promise<IsomorphicCrypto>;
|
|
52
52
|
getIdToken(): Promise<string>;
|
|
53
53
|
getOpenIDProviderEndpoints(): Promise<OIDCEndpoints>;
|
|
54
|
-
getAccessToken(): Promise<string>;
|
|
54
|
+
getAccessToken(sessionId?: string): Promise<string>;
|
|
55
55
|
getIDPAccessToken(): Promise<string>;
|
|
56
56
|
getStorageManager(): StorageManager<T>;
|
|
57
57
|
isSignedIn(): Promise<boolean>;
|
|
@@ -41,7 +41,7 @@ export interface MainThreadClientInterface {
|
|
|
41
41
|
getConfigData(): Promise<AuthClientConfig<MainThreadClientConfig>>;
|
|
42
42
|
getIdToken(): Promise<string>;
|
|
43
43
|
getOpenIDProviderEndpoints(): Promise<OIDCEndpoints>;
|
|
44
|
-
getAccessToken(): Promise<string>;
|
|
44
|
+
getAccessToken(sessionId?: string): Promise<string>;
|
|
45
45
|
getStorageManager(): Promise<StorageManager<MainThreadClientConfig>>;
|
|
46
46
|
isSignedIn(): Promise<boolean>;
|
|
47
47
|
reInitialize(config: Partial<AuthClientConfig<MainThreadClientConfig>>): Promise<void>;
|
|
@@ -32,7 +32,7 @@ export interface HttpRequestInterface {
|
|
|
32
32
|
httpFinishCallback?: () => void;
|
|
33
33
|
enableRetrievingSignOutURLFromSession?: (config: SPACustomGrantConfig) => void;
|
|
34
34
|
}
|
|
35
|
-
export interface HttpRequestConfig extends AxiosRequestConfig {
|
|
35
|
+
export interface HttpRequestConfig extends AxiosRequestConfig, Omit<Request, 'headers' | 'method' | 'signal' | 'url'> {
|
|
36
36
|
attachToken?: boolean;
|
|
37
37
|
shouldEncodeToFormData?: boolean;
|
|
38
38
|
shouldAttachIDPAccessToken?: boolean;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2993,7 +2993,7 @@ var MainThreadClient = async (instanceID, config, getAuthHelper) => {
|
|
|
2993
2993
|
const getCrypto = async () => _authenticationHelper.getCrypto();
|
|
2994
2994
|
const getIdToken = async () => _authenticationHelper.getIdToken();
|
|
2995
2995
|
const getOpenIDProviderEndpoints = async () => _authenticationHelper.getOpenIDProviderEndpoints();
|
|
2996
|
-
const getAccessToken = async () => _authenticationHelper.getAccessToken();
|
|
2996
|
+
const getAccessToken = async (sessionId) => _authenticationHelper.getAccessToken(sessionId);
|
|
2997
2997
|
const getStorageManager = async () => _authenticationHelper.getStorageManager();
|
|
2998
2998
|
const getConfigData = async () => _dataLayer.getConfigData();
|
|
2999
2999
|
const isSignedIn = async () => _authenticationHelper.isSignedIn();
|
|
@@ -3487,8 +3487,8 @@ var AuthenticationHelper = class {
|
|
|
3487
3487
|
async getOpenIDProviderEndpoints() {
|
|
3488
3488
|
return this._authenticationClient.getOpenIDProviderEndpoints();
|
|
3489
3489
|
}
|
|
3490
|
-
async getAccessToken() {
|
|
3491
|
-
return this._authenticationClient.getAccessToken();
|
|
3490
|
+
async getAccessToken(sessionId) {
|
|
3491
|
+
return this._authenticationClient.getAccessToken(sessionId);
|
|
3492
3492
|
}
|
|
3493
3493
|
async getIDPAccessToken() {
|
|
3494
3494
|
return (await this._storageManager.getSessionData())?.access_token;
|
|
@@ -4676,7 +4676,7 @@ var _AsgardeoSPAClient = class _AsgardeoSPAClient {
|
|
|
4676
4676
|
*
|
|
4677
4677
|
* @preserve
|
|
4678
4678
|
*/
|
|
4679
|
-
async getAccessToken() {
|
|
4679
|
+
async getAccessToken(sessionId) {
|
|
4680
4680
|
await this._validateMethod();
|
|
4681
4681
|
if (this._storage && [("webWorker" /* WebWorker */, "browserMemory" /* BrowserMemory */)].includes(this._storage)) {
|
|
4682
4682
|
return Promise.reject(
|
|
@@ -4688,7 +4688,7 @@ var _AsgardeoSPAClient = class _AsgardeoSPAClient {
|
|
|
4688
4688
|
);
|
|
4689
4689
|
}
|
|
4690
4690
|
const mainThreadClient = this._client;
|
|
4691
|
-
return mainThreadClient.getAccessToken();
|
|
4691
|
+
return mainThreadClient.getAccessToken(sessionId);
|
|
4692
4692
|
}
|
|
4693
4693
|
/**
|
|
4694
4694
|
* This method return a Promise that resolves with the idp access token.
|