@asgardeo/javascript 0.11.0 → 0.13.0
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/AsgardeoJavaScriptClient.d.ts +2 -0
- package/dist/__legacy__/models/client-config.d.ts +7 -0
- package/dist/cjs/index.js +38 -6
- package/dist/cjs/index.js.map +4 -4
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts +39 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +38 -6
- package/dist/index.js.map +4 -4
- package/dist/models/config.d.ts +78 -0
- package/dist/models/v2/embedded-flow-v2.d.ts +3 -3
- package/dist/models/v2/flow-meta-v2.d.ts +8 -8
- package/package.json +1 -1
package/dist/models/config.d.ts
CHANGED
|
@@ -111,6 +111,84 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
|
|
|
111
111
|
* Not recommended for public clients like browser applications.
|
|
112
112
|
*/
|
|
113
113
|
clientSecret?: string | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* OpenID Connect discovery configuration.
|
|
116
|
+
* Controls how the SDK resolves endpoint URLs from the authorization server.
|
|
117
|
+
* Each discovery mechanism is independently configurable.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* // Use a custom well-known discovery document URL
|
|
121
|
+
* discovery: { wellKnown: { endpoint: "https://custom.example.com/.well-known/openid-configuration" } }
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* // Disable well-known discovery entirely
|
|
125
|
+
* discovery: { wellKnown: { enabled: false } }
|
|
126
|
+
*/
|
|
127
|
+
discovery?: {
|
|
128
|
+
/**
|
|
129
|
+
* Configuration for OpenID Connect Discovery via the well-known endpoint (RFC 8414).
|
|
130
|
+
* The SDK fetches `{baseUrl}/oauth2/token/.well-known/openid-configuration` by default.
|
|
131
|
+
*/
|
|
132
|
+
wellKnown?: {
|
|
133
|
+
/**
|
|
134
|
+
* Whether to fetch and use the well-known discovery document to resolve endpoint URLs.
|
|
135
|
+
* @default true
|
|
136
|
+
*/
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Optional overrides for the OIDC protocol endpoints.
|
|
142
|
+
* By default, the SDK derives all endpoint URLs from the well-known discovery document
|
|
143
|
+
* located at `{baseUrl}/oauth2/token/.well-known/openid-configuration`.
|
|
144
|
+
* Use this when your authorization server exposes endpoints at non-standard paths,
|
|
145
|
+
* or when a custom domain differs from `baseUrl`.
|
|
146
|
+
*
|
|
147
|
+
* Individual overrides take precedence over values resolved from the discovery document.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* endpoints: {
|
|
151
|
+
* wellKnown: "https://custom-domain.example.com/.well-known/openid-configuration",
|
|
152
|
+
* authorization: "https://custom-domain.example.com/oauth2/authorize",
|
|
153
|
+
* }
|
|
154
|
+
*/
|
|
155
|
+
endpoints?: {
|
|
156
|
+
/**
|
|
157
|
+
* The authorization endpoint URL.
|
|
158
|
+
* If not provided, resolved from the well-known discovery document.
|
|
159
|
+
*/
|
|
160
|
+
authorization?: string;
|
|
161
|
+
/**
|
|
162
|
+
* The end-session (logout) endpoint URL.
|
|
163
|
+
* If not provided, resolved from the well-known discovery document.
|
|
164
|
+
*/
|
|
165
|
+
endSession?: string;
|
|
166
|
+
/**
|
|
167
|
+
* The introspection endpoint URL.
|
|
168
|
+
* If not provided, resolved from the well-known discovery document.
|
|
169
|
+
*/
|
|
170
|
+
introspection?: string;
|
|
171
|
+
/**
|
|
172
|
+
* The JSON Web Key Set (JWKS) endpoint URL used to fetch public keys for token verification.
|
|
173
|
+
* If not provided, resolved from the well-known discovery document.
|
|
174
|
+
*/
|
|
175
|
+
jwks?: string;
|
|
176
|
+
/**
|
|
177
|
+
* The token endpoint URL.
|
|
178
|
+
* If not provided, resolved from the well-known discovery document.
|
|
179
|
+
*/
|
|
180
|
+
token?: string;
|
|
181
|
+
/**
|
|
182
|
+
* The userinfo endpoint URL.
|
|
183
|
+
* If not provided, resolved from the well-known discovery document.
|
|
184
|
+
*/
|
|
185
|
+
userInfo?: string;
|
|
186
|
+
/**
|
|
187
|
+
* The OpenID Connect discovery document URL.
|
|
188
|
+
* Defaults to `{baseUrl}/oauth2/token/.well-known/openid-configuration`.
|
|
189
|
+
*/
|
|
190
|
+
wellKnown?: string;
|
|
191
|
+
};
|
|
114
192
|
/**
|
|
115
193
|
* Optional instance ID for multi-auth context support.
|
|
116
194
|
* Use this when you need multiple authentication contexts in the same application.
|
|
@@ -406,7 +406,7 @@ export interface ConsentPurposeDecision {
|
|
|
406
406
|
/** Per-attribute decisions for this purpose */
|
|
407
407
|
elements: ConsentAttributeElement[];
|
|
408
408
|
/** The name of the consent purpose */
|
|
409
|
-
|
|
409
|
+
purposeName: string;
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
412
|
* Full consent decisions structure sent to the backend when user submits the consent form.
|
|
@@ -430,9 +430,9 @@ export interface ConsentPurposeData {
|
|
|
430
430
|
/** Attributes that the user can optionally decline */
|
|
431
431
|
optional: string[];
|
|
432
432
|
/** Unique identifier for the purpose */
|
|
433
|
-
|
|
433
|
+
purposeId: string;
|
|
434
434
|
/** Human-readable purpose name */
|
|
435
|
-
|
|
435
|
+
purposeName?: string;
|
|
436
436
|
}
|
|
437
437
|
/**
|
|
438
438
|
* Consent prompt data structure stored in additionalData.consent_prompt.
|
|
@@ -44,13 +44,13 @@ export interface ApplicationMetadata {
|
|
|
44
44
|
/** Application UUID */
|
|
45
45
|
id: string;
|
|
46
46
|
/** URL of the application logo */
|
|
47
|
-
|
|
47
|
+
logoUrl?: string;
|
|
48
48
|
/** Human-readable application name */
|
|
49
49
|
name: string;
|
|
50
50
|
/** Privacy Policy URI */
|
|
51
|
-
|
|
51
|
+
policyUri?: string;
|
|
52
52
|
/** Terms of Service URI */
|
|
53
|
-
|
|
53
|
+
tosUri?: string;
|
|
54
54
|
/** Application home URL */
|
|
55
55
|
url?: string;
|
|
56
56
|
}
|
|
@@ -64,7 +64,7 @@ export interface ApplicationMetadata {
|
|
|
64
64
|
*/
|
|
65
65
|
export interface OUMetadata {
|
|
66
66
|
/** Cookie Policy URI */
|
|
67
|
-
|
|
67
|
+
cookiePolicyUri?: string;
|
|
68
68
|
/** Optional description of the organization unit */
|
|
69
69
|
description?: string;
|
|
70
70
|
/** Unique handle / slug for the organization unit */
|
|
@@ -72,13 +72,13 @@ export interface OUMetadata {
|
|
|
72
72
|
/** Organization unit UUID */
|
|
73
73
|
id: string;
|
|
74
74
|
/** URL of the organization unit logo */
|
|
75
|
-
|
|
75
|
+
logoUrl?: string;
|
|
76
76
|
/** Human-readable organization unit name */
|
|
77
77
|
name: string;
|
|
78
78
|
/** Privacy Policy URI */
|
|
79
|
-
|
|
79
|
+
policyUri?: string;
|
|
80
80
|
/** Terms of Service URI */
|
|
81
|
-
|
|
81
|
+
tosUri?: string;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* A single color entry in the v2 theme color scheme.
|
|
@@ -235,7 +235,7 @@ export interface FlowMetadataResponse {
|
|
|
235
235
|
/** Internationalisation metadata and translations */
|
|
236
236
|
i18n: I18nMetadata;
|
|
237
237
|
/** Indicates whether the registration flow is enabled for the entity */
|
|
238
|
-
|
|
238
|
+
isRegistrationFlowEnabled: boolean;
|
|
239
239
|
/**
|
|
240
240
|
* Organization unit metadata.
|
|
241
241
|
* Always present when `type=OU`.
|