@asgardeo/javascript 0.0.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.
Files changed (57) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +57 -0
  3. package/dist/AsgardeoJavaScriptClient.d.ts +81 -0
  4. package/dist/IsomorphicCrypto.d.ts +73 -0
  5. package/dist/__legacy__/client.d.ts +488 -0
  6. package/dist/__legacy__/core/authentication-core.d.ts +51 -0
  7. package/dist/__legacy__/core/index.d.ts +18 -0
  8. package/dist/__legacy__/data/data-layer.d.ts +64 -0
  9. package/dist/__legacy__/data/index.d.ts +18 -0
  10. package/dist/__legacy__/exception/exception.d.ts +23 -0
  11. package/dist/__legacy__/exception/index.d.ts +18 -0
  12. package/dist/__legacy__/helpers/authentication-helper.d.ts +37 -0
  13. package/dist/__legacy__/helpers/index.d.ts +18 -0
  14. package/dist/__legacy__/models/authorization-url.d.ts +23 -0
  15. package/dist/__legacy__/models/client-config.d.ts +60 -0
  16. package/dist/__legacy__/models/custom-grant.d.ts +26 -0
  17. package/dist/__legacy__/models/data.d.ts +27 -0
  18. package/dist/__legacy__/models/fetch.d.ts +55 -0
  19. package/dist/__legacy__/models/index.d.ts +23 -0
  20. package/dist/__legacy__/models/user.d.ts +85 -0
  21. package/dist/api/oidc/getUserInfo.d.ts +37 -0
  22. package/dist/cjs/index.js +2227 -0
  23. package/dist/cjs/index.js.map +7 -0
  24. package/dist/constants/OIDCDiscoveryConstants.d.ts +153 -0
  25. package/dist/constants/OIDCRequestConstants.d.ts +66 -0
  26. package/dist/constants/PKCEConstants.d.ts +58 -0
  27. package/dist/constants/ScopeConstants.d.ts +45 -0
  28. package/dist/constants/TokenConstants.d.ts +76 -0
  29. package/dist/constants/TokenExchangeConstants.d.ts +68 -0
  30. package/dist/errors/AsgardeoAPIError.d.ts +52 -0
  31. package/dist/errors/AsgardeoError.d.ts +49 -0
  32. package/dist/errors/AsgardeoRuntimeError.d.ts +50 -0
  33. package/dist/index.d.ts +45 -0
  34. package/dist/index.js +2186 -0
  35. package/dist/index.js.map +7 -0
  36. package/dist/models/client.d.ts +84 -0
  37. package/dist/models/config.d.ts +81 -0
  38. package/dist/models/crypto.d.ts +100 -0
  39. package/dist/models/id-token.d.ts +55 -0
  40. package/dist/models/oauth-response.d.ts +34 -0
  41. package/dist/models/oidc-discovery.d.ts +369 -0
  42. package/dist/models/oidc-endpoints.d.ts +70 -0
  43. package/dist/models/scim2-schema.d.ts +62 -0
  44. package/dist/models/store.d.ts +81 -0
  45. package/dist/models/token.d.ts +121 -0
  46. package/dist/models/user.d.ts +106 -0
  47. package/dist/models/utility-types.d.ts +20 -0
  48. package/dist/theme/createTheme.d.ts +21 -0
  49. package/dist/theme/types.d.ts +59 -0
  50. package/dist/utils/cryptoUtils.d.ts +0 -0
  51. package/dist/utils/extractPkceStorageKeyFromState.d.ts +32 -0
  52. package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +31 -0
  53. package/dist/utils/extractUserClaimsFromIdToken.d.ts +44 -0
  54. package/dist/utils/generatePkceStorageKey.d.ts +34 -0
  55. package/dist/utils/generateStateParamForRequestCorrelation.d.ts +34 -0
  56. package/dist/utils/removeTrailingSlash.d.ts +31 -0
  57. package/package.json +61 -0
@@ -0,0 +1,100 @@
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
+ /**
19
+ * JWK Model
20
+ */
21
+ export interface JWKInterface {
22
+ kty: string;
23
+ e: string;
24
+ use: string;
25
+ kid: string;
26
+ alg: string;
27
+ n: string;
28
+ }
29
+ /**
30
+ * Cryptographic utility interface for OIDC operations.
31
+ * Provides methods for encoding, decoding, hashing, and JWT verification
32
+ * used in OAuth2/OIDC flows.
33
+ *
34
+ * @remarks
35
+ * This interface abstracts cryptographic operations needed for:
36
+ * - PKCE challenge/verifier generation
37
+ * - JWT token validation
38
+ * - Base64URL encoding/decoding
39
+ * - Secure random number generation
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * class MyCrypto implements Crypto<Uint8Array> {
44
+ * base64URLEncode(value: Uint8Array): string {
45
+ * // Implementation
46
+ * }
47
+ * // ... other implementations
48
+ * }
49
+ * ```
50
+ */
51
+ export interface Crypto<T = any> {
52
+ /**
53
+ * Encode the provided data in base64url format.
54
+ *
55
+ * @param value - Data to be encoded.
56
+ *
57
+ * @returns Encoded data.
58
+ */
59
+ base64URLEncode(value: T): string;
60
+ /**
61
+ * Decode the provided data encoded in base64url format.
62
+ *
63
+ * @param value - Data to be decoded.
64
+ *
65
+ * @returns Decoded data.
66
+ */
67
+ base64URLDecode(value: string): string;
68
+ /**
69
+ * Generate random bytes.
70
+ *
71
+ * @param length - Length of the random bytes to be generated.
72
+ *
73
+ * @returns Random bytes.
74
+ */
75
+ generateRandomBytes(length: number): T;
76
+ /**
77
+ * Hash the provided data using SHA-256.
78
+ *
79
+ * @param data - Data to be hashed.
80
+ *
81
+ * @returns Hashed data.
82
+ */
83
+ hashSha256(data: string): T;
84
+ /**
85
+ * Verify the provided JWT.
86
+ *
87
+ * @param idToken - ID Token to be verified.
88
+ * @param jwk - JWK to be used for verification.
89
+ * @param algorithms - Algorithms to be used for verification.
90
+ * @param clientID - Client ID to be used for verification.
91
+ * @param issuer - Issuer to be used for verification.
92
+ * @param subject - Subject to be used for verification.
93
+ * @param clockTolerance - Clock tolerance to be used for verification.
94
+ *
95
+ * @returns True if the ID Token is valid.
96
+ *
97
+ * @throws if the id_token is invalid.
98
+ */
99
+ verifyJwt(idToken: string, jwk: JWKInterface, algorithms: string[], clientID: string, issuer: string, subject: string, clockTolerance?: number, validateJwtIssuer?: boolean): Promise<boolean>;
100
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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
+ /**
19
+ * Interface for the standard (required) claims of an ID Token payload.
20
+ */
21
+ export interface IdTokenPayloadStandardClaims {
22
+ /**
23
+ * The audience for which this token is intended.
24
+ */
25
+ aud: string | string[];
26
+ /**
27
+ * The unique identifier of the user to whom the ID token belongs.
28
+ */
29
+ sub: string;
30
+ /**
31
+ * The issuer identifier for the issuer of the response.
32
+ */
33
+ iss: string;
34
+ /**
35
+ * The email of the user.
36
+ */
37
+ email?: string;
38
+ /**
39
+ * The username the user prefers to be called.
40
+ */
41
+ preferred_username?: string;
42
+ /**
43
+ * The tenant domain of the user.
44
+ */
45
+ tenant_domain?: string;
46
+ }
47
+ /**
48
+ * Interface for ID Token payload including custom claims.
49
+ */
50
+ export interface IdTokenPayload extends IdTokenPayloadStandardClaims {
51
+ /**
52
+ * Other custom claims.
53
+ */
54
+ [claim: string]: any;
55
+ }
@@ -0,0 +1,34 @@
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
+ /**
19
+ * Enum representing different OAuth response modes.
20
+ */
21
+ export declare enum ResponseMode {
22
+ /**
23
+ * Response is returned as POST parameters in an HTML form.
24
+ */
25
+ FormPost = "form_post",
26
+ /**
27
+ * Response is returned as query parameters in the URL.
28
+ */
29
+ Query = "query",
30
+ /**
31
+ * Response is returned directly to the client.
32
+ */
33
+ Direct = "direct"
34
+ }
@@ -0,0 +1,369 @@
1
+ /**
2
+ * Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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
+ /**
19
+ * Comprehensive OpenID Connect (OIDC) Provider Metadata.
20
+ * This interface represents the complete set of configuration metadata
21
+ * that an OpenID Provider (OP) may publish at its discovery endpoint.
22
+ *
23
+ * @remarks
24
+ * The metadata is organized into several categories:
25
+ * 1. Core Endpoints - Essential URLs for OIDC operations
26
+ * 2. Capability Indicators - Supported features and algorithms
27
+ * 3. Claims and Scopes - Available user information
28
+ * 4. Security Settings - Authentication and encryption options
29
+ * 5. UI/UX Configuration - Display and localization preferences
30
+ *
31
+ * All fields are optional as per the OIDC Discovery specification,
32
+ * allowing for flexible provider implementations.
33
+ *
34
+ * @see {@link https://openid.net/specs/openid-connect-discovery-1_0.html OpenID Connect Discovery Specification}
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const config: OIDCProviderMetadata = {
39
+ * issuer: "https://accounts.example.com",
40
+ * authorization_endpoint: "https://accounts.example.com/auth",
41
+ * token_endpoint: "https://accounts.example.com/token",
42
+ * userinfo_endpoint: "https://accounts.example.com/userinfo",
43
+ * jwks_uri: "https://accounts.example.com/jwks.json"
44
+ * };
45
+ * ```
46
+ */
47
+ export interface OIDCDiscoveryApiResponse extends OIDCDiscoveryEndpointsApiResponse {
48
+ /**
49
+ * Supported OAuth 2.0 scope values.
50
+ * Lists the permission scopes this server can handle.
51
+ *
52
+ * @remarks
53
+ * Common values include:
54
+ * - 'openid' - Required for OIDC flows
55
+ * - 'profile' - Basic user information
56
+ * - 'email' - User's email address
57
+ * - 'address' - User's postal address
58
+ * - 'phone' - User's phone number
59
+ */
60
+ scopes_supported?: string[];
61
+ /**
62
+ * Supported OAuth 2.0 response_type values.
63
+ *
64
+ * @remarks
65
+ * Common values include:
66
+ * - 'code' - Authorization Code flow
67
+ * - 'token' - Implicit flow
68
+ * - 'id_token' - OIDC implicit flow
69
+ * - 'code token' - Hybrid flow
70
+ */
71
+ response_types_supported?: string[];
72
+ /**
73
+ * Supported OAuth 2.0 response_mode values.
74
+ *
75
+ * @remarks
76
+ * Determines how the authorization response is returned:
77
+ * - 'query' - Parameters in URL query string
78
+ * - 'fragment' - Parameters in URL fragment
79
+ * - 'form_post' - Parameters via POST
80
+ */
81
+ response_modes_supported?: string[];
82
+ /**
83
+ * Supported OAuth 2.0 grant type values.
84
+ *
85
+ * @remarks
86
+ * Common values include:
87
+ * - 'authorization_code' - Standard OAuth 2.0 auth code flow
88
+ * - 'implicit' - Implicit flow
89
+ * - 'refresh_token' - Refresh token grant
90
+ * - 'client_credentials' - Client credentials grant
91
+ */
92
+ grant_types_supported?: string[];
93
+ /**
94
+ * Supported Authentication Context Class References.
95
+ * Indicates the OP's ability to satisfy specific authentication requirements.
96
+ */
97
+ acr_values_supported?: string[];
98
+ /**
99
+ * Supported Subject Identifier types.
100
+ * Defines how the OP identifies users across sessions.
101
+ *
102
+ * @remarks
103
+ * Common values:
104
+ * - 'public' - Same sub value for all clients
105
+ * - 'pairwise' - Different sub values for different clients
106
+ */
107
+ subject_types_supported?: string[];
108
+ /**
109
+ * JSON array containing a list of the JWS signing algorithms (alg values)
110
+ * supported by the OP for the ID Token to encode the Claims in a JWT [JWT].
111
+ */
112
+ id_token_signing_alg_values_supported?: string[];
113
+ /**
114
+ * JSON array containing a list of the JWE encryption algorithms (alg values)
115
+ * supported by the OP for the ID Token to encode the Claims in a JWT [JWT].
116
+ */
117
+ id_token_encryption_alg_values_supported?: string[];
118
+ /**
119
+ * JSON array containing a list of the JWE encryption algorithms (enc values)
120
+ * supported by the OP for the ID Token to encode the Claims in a JWT [JWT].
121
+ */
122
+ id_token_encryption_enc_values_supported?: string[];
123
+ /**
124
+ * JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA]
125
+ * supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
126
+ */
127
+ userinfo_signing_alg_values_supported?: string[];
128
+ /**
129
+ * JSON array containing a list of the JWE [JWE] encryption algorithms (alg values)
130
+ * [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
131
+ */
132
+ userinfo_encryption_alg_values_supported?: string[];
133
+ /**
134
+ * JSON array containing a list of the JWE encryption algorithms (enc values) [JWA]
135
+ * supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]
136
+ */
137
+ userinfo_encryption_enc_values_supported?: string[];
138
+ /**
139
+ * JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for Request Objects
140
+ */
141
+ request_object_signing_alg_values_supported?: string[];
142
+ /**
143
+ * JSON array containing a list of the JWE encryption algorithms (alg values)
144
+ * supported by the OP for Request Objects.
145
+ */
146
+ request_object_encryption_alg_values_supported?: string[];
147
+ /**
148
+ * JSON array containing a list of the JWE encryption algorithms (enc values)
149
+ * supported by the OP for Request Objects.
150
+ */
151
+ request_object_encryption_enc_values_supported?: string[];
152
+ /**
153
+ * JSON array containing a list of Client Authentication methods supported by this Token Endpoint.
154
+ */
155
+ token_endpoint_auth_methods_supported?: string[];
156
+ /**
157
+ * JSON array containing a list of the JWS signing algorithms (alg values) supported by the Token Endpoint
158
+ * for the signature on the JWT [JWT] used to authenticate the Client at the Token Endpoint for the
159
+ * private_key_jwt and client_secret_jwt authentication methods.
160
+ */
161
+ token_endpoint_auth_signing_alg_values_supported?: string[];
162
+ /**
163
+ * JSON array containing a list of the display parameter values that the OpenID Provider supports.
164
+ */
165
+ display_values_supported?: string[];
166
+ /**
167
+ * JSON array containing a list of the Claim Types that the OpenID Provider supports.
168
+ */
169
+ claim_types_supported?: string[];
170
+ /**
171
+ * JSON array containing a list of the Claim Names of the Claims that
172
+ * the OpenID Provider MAY be able to supply values for.
173
+ */
174
+ claims_supported?: string[];
175
+ /**
176
+ * URL of a page containing human-readable information that developers
177
+ * might want or need to know when using the OpenID Provider.
178
+ */
179
+ service_documentation?: string;
180
+ /**
181
+ * Languages and scripts supported for values in Claims being returned, represented as a JSON array
182
+ * of BCP47 [RFC5646] language tag values. Not all languages and scripts are necessarily
183
+ * supported for all Claim values.
184
+ */
185
+ claims_locales_supported?: string[];
186
+ /**
187
+ * Languages and scripts supported for the user interface,
188
+ * represented as a JSON array of BCP47 [RFC5646] language tag values.
189
+ */
190
+ ui_locales_supported?: string[];
191
+ /**
192
+ * Boolean value specifying whether the OP supports use of the claims parameter,
193
+ * with true indicating support. If omitted, the default value is false.
194
+ */
195
+ claims_parameter_supported?: boolean;
196
+ /**
197
+ * Boolean value specifying whether the OP supports use of the request parameter,
198
+ * with true indicating support. If omitted, the default value is false.
199
+ */
200
+ request_parameter_supported?: boolean;
201
+ /**
202
+ * Boolean value specifying whether the OP supports use of the request_uri parameter,
203
+ * with true indicating support. If omitted, the default value is true.
204
+ */
205
+ request_uri_parameter_supported?: boolean;
206
+ /**
207
+ * Boolean value specifying whether the OP requires any request_uri values used to be
208
+ * pre-registered using the request_uris registration parameter.
209
+ */
210
+ require_request_uri_registration?: boolean;
211
+ /**
212
+ * URL that the OpenID Provider provides to the person registering the Client
213
+ * to read about the OP's requirements on how the Relying Party can use the data provided by the OP.
214
+ */
215
+ op_policy_uri?: string;
216
+ /**
217
+ * URL that the OpenID Provider provides to the person registering the Client
218
+ * to read about OpenID Provider's terms of service.
219
+ */
220
+ op_tos_uri?: string;
221
+ /**
222
+ * JSON array containing a list of client authentication
223
+ * methods supported by this revocation endpoint.
224
+ */
225
+ revocation_endpoint_auth_methods_supported?: string[];
226
+ /**
227
+ * JSON array containing a list of the JWS signing
228
+ * algorithms ("alg" values) supported by the revocation endpoint for
229
+ * the signature on the JWT [JWT] used to authenticate the client at
230
+ * the revocation endpoint for the "private_key_jwt" and
231
+ * "client_secret_jwt" authentication methods.
232
+ */
233
+ revocation_endpoint_auth_signing_alg_values_supported?: string[];
234
+ /**
235
+ * JSON array containing a list of client authentication
236
+ * methods supported by this introspection endpoint.
237
+ */
238
+ introspection_endpoint_auth_methods_supported?: string[];
239
+ /**
240
+ * JSON array containing a list of the JWS signing
241
+ * algorithms ("alg" values) supported by the introspection endpoint
242
+ * for the signature on the JWT [JWT] used to authenticate the client
243
+ * at the introspection endpoint for the "private_key_jwt" and
244
+ * "client_secret_jwt" authentication methods.
245
+ */
246
+ introspection_endpoint_auth_signing_alg_values_supported?: string[];
247
+ /**
248
+ * JSON array containing a list of Proof Key for Code
249
+ * Exchange (PKCE) [RFC7636] code challenge methods supported by this
250
+ * authorization server.
251
+ */
252
+ code_challenge_methods_supported?: string[];
253
+ /**
254
+ * Boolean value specifying whether the OP supports back-channel logout, with true indicating support.
255
+ * If omitted, the default value is false.
256
+ */
257
+ backchannel_logout_supported?: boolean;
258
+ /**
259
+ * Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to
260
+ * identify the RP session with the OP.
261
+ */
262
+ backchannel_logout_session_supported?: boolean;
263
+ }
264
+ /**
265
+ * Essential OpenID Connect (OIDC) Provider endpoints configuration.
266
+ * This interface represents the core set of endpoints that an OpenID Provider
267
+ * must expose for basic OIDC functionality.
268
+ *
269
+ * @remarks
270
+ * These endpoints form the foundation of OIDC operations and are organized into categories:
271
+ * 1. Authentication Flow - Authorization and token endpoints
272
+ * 2. User Data - UserInfo and session management
273
+ * 3. Security - Key management and token operations
274
+ * 4. Session Management - Logout and session state
275
+ *
276
+ * While all fields are optional in the interface, an OIDC Provider typically
277
+ * implements most of these endpoints for full OIDC compliance.
278
+ *
279
+ * @see {@link OIDCDiscoveryApiResponse} For the complete provider metadata
280
+ * @see {@link https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata Provider Metadata Specification}
281
+ *
282
+ * @example
283
+ * ```typescript
284
+ * const endpoints: OIDCDiscoveryEndpointsApiResponse = {
285
+ * issuer: "https://identity.example.com",
286
+ * authorization_endpoint: "https://identity.example.com/oauth2/authorize",
287
+ * token_endpoint: "https://identity.example.com/oauth2/token",
288
+ * userinfo_endpoint: "https://identity.example.com/oauth2/userinfo"
289
+ * };
290
+ * ```
291
+ */
292
+ export interface OIDCDiscoveryEndpointsApiResponse {
293
+ /**
294
+ * HTTPS URL that the OP asserts as its Issuer Identifier.
295
+ * Must not contain query or fragment components.
296
+ *
297
+ * @remarks
298
+ * This is a crucial identifier for the OpenID Provider and should
299
+ * match the iss claim in issued JWT tokens.
300
+ */
301
+ issuer?: string;
302
+ /**
303
+ * OAuth 2.0 Authorization Endpoint URL.
304
+ * Used to initiate the authentication and authorization process.
305
+ *
306
+ * @remarks
307
+ * The client redirects the user to this endpoint to begin the auth flow.
308
+ * Supports various response_type values for different OAuth 2.0 flows.
309
+ */
310
+ authorization_endpoint?: string;
311
+ /**
312
+ * OAuth 2.0 Token Endpoint URL.
313
+ * Used to obtain tokens using various grant types.
314
+ *
315
+ * @remarks
316
+ * Clients use this endpoint to exchange authorization codes for tokens
317
+ * and to refresh expired access tokens.
318
+ */
319
+ token_endpoint?: string;
320
+ /**
321
+ * UserInfo Endpoint URL.
322
+ * Returns claims about the authenticated end-user.
323
+ *
324
+ * @remarks
325
+ * Requires a valid access token with appropriate scope.
326
+ * May return claims in JWT format if signing/encryption is configured.
327
+ */
328
+ userinfo_endpoint?: string;
329
+ /**
330
+ * JSON Web Key Set (JWKS) document URL.
331
+ * Contains the cryptographic keys used to secure communications.
332
+ *
333
+ * @remarks
334
+ * Used by clients to:
335
+ * - Validate signatures on JWT tokens
336
+ * - Encrypt requests to the OP
337
+ * - Establish secure communications
338
+ */
339
+ jwks_uri?: string;
340
+ /**
341
+ * Dynamic Client Registration Endpoint URL.
342
+ * Allows automated registration of OAuth 2.0 clients.
343
+ *
344
+ * @remarks
345
+ * If supported, enables automated client setup and configuration.
346
+ * May require initial authentication or access tokens.
347
+ */
348
+ registration_endpoint?: string;
349
+ /**
350
+ * URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the
351
+ * OP.
352
+ */
353
+ end_session_endpoint?: string;
354
+ /**
355
+ * URL of an OP iframe that supports cross-origin communications for session state information with the RP
356
+ * Client, using the HTML5 postMessage API.
357
+ */
358
+ check_session_iframe?: string;
359
+ /**
360
+ * URL of the authorization server's OAuth 2.0
361
+ * introspection endpoint.
362
+ */
363
+ introspection_endpoint?: string;
364
+ /**
365
+ * URL of the authorization server's OAuth 2.0 revocation
366
+ * endpoint.
367
+ */
368
+ revocation_endpoint?: string;
369
+ }
@@ -0,0 +1,70 @@
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
+ /**
19
+ * @deprecated Use the properties defined in the new `OIDCEndpoints` at the `/models/oidc-endpoints.ts` instead.
20
+ * FIXME: Remove this once the final refactoring is done.
21
+ */
22
+ export interface LegacyOIDCEndpoints {
23
+ authorizationEndpoint: string;
24
+ tokenEndpoint: string;
25
+ userinfoEndpoint: string;
26
+ jwksUri: string;
27
+ registrationEndpoint?: string;
28
+ revocationEndpoint: string;
29
+ introspectionEndpoint?: string;
30
+ checkSessionIframe: string;
31
+ endSessionEndpoint: string;
32
+ }
33
+ /**
34
+ * Interface representing OpenID Connect endpoints configuration.
35
+ * FIXME: Remove the temporary extends of legacy OIDC endpoints.
36
+ */
37
+ export interface OIDCEndpoints extends Partial<LegacyOIDCEndpoints> {
38
+ /**
39
+ * The issuer identifier URL for the OpenID Provider
40
+ */
41
+ issuer: string;
42
+ /**
43
+ * The OpenID Provider's discovery endpoint URL
44
+ */
45
+ discovery: string;
46
+ /**
47
+ * The authorization endpoint URL where the authentication request is sent
48
+ */
49
+ authorization: string;
50
+ /**
51
+ * The userinfo endpoint URL that returns claims about the authenticated user
52
+ */
53
+ userinfo: string;
54
+ /**
55
+ * The introspection endpoint URL used to validate tokens
56
+ */
57
+ introspection: string;
58
+ /**
59
+ * The JSON Web Key Set endpoint URL that provides the public keys to verify tokens
60
+ */
61
+ jwks: string;
62
+ /**
63
+ * The revocation endpoint URL used to revoke access or refresh tokens
64
+ */
65
+ revocation: string;
66
+ /**
67
+ * The end session endpoint URL used to terminate the user's session
68
+ */
69
+ endSession: string;
70
+ }
@@ -0,0 +1,62 @@
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 SchemaAttribute {
19
+ name: string;
20
+ type: string;
21
+ multiValued: boolean;
22
+ description?: string;
23
+ required?: boolean;
24
+ caseExact: boolean;
25
+ mutability: string;
26
+ returned: string;
27
+ uniqueness: string;
28
+ displayName?: string;
29
+ displayOrder?: string;
30
+ regEx?: string;
31
+ supportedByDefault?: string;
32
+ sharedProfileValueResolvingMethod?: string;
33
+ subAttributes?: SchemaAttribute[];
34
+ }
35
+ /**
36
+ * Represents a SCIM2 schema definition
37
+ */
38
+ export interface Schema {
39
+ /** Schema identifier */
40
+ id: string;
41
+ /** Schema name */
42
+ name: string;
43
+ /** Schema description */
44
+ description: string;
45
+ /** Schema attributes */
46
+ attributes: SchemaAttribute[];
47
+ }
48
+ /**
49
+ * Well-known SCIM2 schema IDs
50
+ */
51
+ export declare enum WellKnownSchemaIds {
52
+ /** Core Schema */
53
+ Core = "urn:ietf:params:scim:schemas:core:2.0",
54
+ /** User Schema */
55
+ User = "urn:ietf:params:scim:schemas:core:2.0:User",
56
+ /** Enterprise User Schema */
57
+ EnterpriseUser = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
58
+ /** System User Schema */
59
+ SystemUser = "urn:scim:wso2:schema",
60
+ /** Custom User Schema */
61
+ CustomUser = "urn:scim:schemas:extension:custom:User"
62
+ }