@asgardeo/javascript 0.15.0 → 0.16.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/dist/HttpClient.d.ts +64 -0
- package/dist/cjs/index.js +100 -0
- package/dist/cjs/index.js.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +99 -0
- package/dist/index.js.map +4 -4
- package/dist/models/config.d.ts +15 -1
- package/dist/models/http.d.ts +45 -0
- package/dist/models/v2/embedded-flow-v2.d.ts +7 -0
- package/package.json +2 -2
package/dist/models/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
2
|
+
* Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
3
|
*
|
|
4
4
|
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
5
|
* Version 2.0 (the "License"); you may not use this file except
|
|
@@ -281,6 +281,20 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
281
281
|
* @see {@link https://openid.net/specs/openid-connect-session-management-1_0.html#IframeBasedSessionManagement}
|
|
282
282
|
*/
|
|
283
283
|
syncSession?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Configuration for token lifecycle management.
|
|
286
|
+
*/
|
|
287
|
+
tokenLifecycle?: {
|
|
288
|
+
/**
|
|
289
|
+
* Configuration for refresh token behavior.
|
|
290
|
+
*/
|
|
291
|
+
refreshToken?: {
|
|
292
|
+
/**
|
|
293
|
+
* Whether to automatically refresh the access token periodically before it expires.
|
|
294
|
+
*/
|
|
295
|
+
autoRefresh?: boolean;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
284
298
|
/**
|
|
285
299
|
* Token validation configuration.
|
|
286
300
|
* This allows you to configure how the SDK validates tokens received from the authorization server.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
export interface HttpResponse<T = any> {
|
|
19
|
+
config: HttpRequestConfig;
|
|
20
|
+
data: T;
|
|
21
|
+
headers: Record<string, string>;
|
|
22
|
+
status: number;
|
|
23
|
+
statusText: string;
|
|
24
|
+
}
|
|
25
|
+
export interface HttpError extends Error {
|
|
26
|
+
code?: string;
|
|
27
|
+
config?: HttpRequestConfig;
|
|
28
|
+
response?: {
|
|
29
|
+
data?: any;
|
|
30
|
+
headers?: Record<string, string>;
|
|
31
|
+
status: number;
|
|
32
|
+
statusText?: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface HttpRequestConfig {
|
|
36
|
+
attachToken?: boolean;
|
|
37
|
+
data?: any;
|
|
38
|
+
headers?: Record<string, string>;
|
|
39
|
+
method?: string;
|
|
40
|
+
params?: Record<string, any>;
|
|
41
|
+
shouldAttachIDPAccessToken?: boolean;
|
|
42
|
+
shouldEncodeToFormData?: boolean;
|
|
43
|
+
startTimeInMs?: number;
|
|
44
|
+
url?: string;
|
|
45
|
+
}
|
|
@@ -42,6 +42,8 @@ export declare enum EmbeddedFlowComponentType {
|
|
|
42
42
|
Block = "BLOCK",
|
|
43
43
|
/** Consent component for displaying consent purposes and attributes */
|
|
44
44
|
Consent = "CONSENT",
|
|
45
|
+
/** Copyable text display component that shows text with a copy-to-clipboard action */
|
|
46
|
+
CopyableText = "COPYABLE_TEXT",
|
|
45
47
|
/** Divider component for visual separation of content */
|
|
46
48
|
Divider = "DIVIDER",
|
|
47
49
|
/** Email input field with validation for email addresses. */
|
|
@@ -257,6 +259,11 @@ export interface EmbeddedFlowComponent {
|
|
|
257
259
|
* Icon size in pixels (for Icon components).
|
|
258
260
|
*/
|
|
259
261
|
size?: number;
|
|
262
|
+
/**
|
|
263
|
+
* Data source key for dynamic components (e.g., COPYABLE_TEXT).
|
|
264
|
+
* References a key in additionalData whose value is resolved at render time.
|
|
265
|
+
*/
|
|
266
|
+
source?: string;
|
|
260
267
|
/**
|
|
261
268
|
* Image source URL (for Image components).
|
|
262
269
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgardeo/javascript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Framework agnostic JavaScript SDK for Asgardeo.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"asgardeo",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"tslib": "2.8.1",
|
|
49
49
|
"jose": "^5.2.0",
|
|
50
|
-
"@asgardeo/i18n": "0.4.
|
|
50
|
+
"@asgardeo/i18n": "0.4.5"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|