@asgardeo/javascript 0.7.1 → 0.7.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/AsgardeoJavaScriptClient.d.ts +3 -4
- package/dist/IsomorphicCrypto.d.ts +2 -2
- package/dist/StorageManager.d.ts +6 -8
- package/dist/__legacy__/client.d.ts +15 -15
- package/dist/__legacy__/helpers/authentication-helper.d.ts +5 -5
- package/dist/__legacy__/models/client-config.d.ts +14 -14
- package/dist/api/createOrganization.d.ts +8 -8
- package/dist/api/getAllOrganizations.d.ts +5 -5
- package/dist/api/getBrandingPreference.d.ts +5 -5
- package/dist/api/getMeOrganizations.d.ts +9 -9
- package/dist/api/getOrganization.d.ts +4 -4
- package/dist/api/getSchemas.d.ts +4 -4
- package/dist/api/getScim2Me.d.ts +4 -4
- package/dist/api/updateMeProfile.d.ts +7 -7
- package/dist/api/updateOrganization.d.ts +5 -5
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +16 -16
- package/dist/cjs/index.js +1176 -1184
- package/dist/cjs/index.js.map +4 -4
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +14 -14
- package/dist/constants/OIDCDiscoveryConstants.d.ts +17 -106
- package/dist/constants/OIDCRequestConstants.d.ts +6 -44
- package/dist/constants/PKCEConstants.d.ts +3 -18
- package/dist/constants/TokenConstants.d.ts +2 -31
- package/dist/constants/TokenExchangeConstants.d.ts +5 -30
- package/dist/index.js +1177 -1185
- package/dist/index.js.map +4 -4
- package/dist/models/branding-preference.d.ts +5 -5
- package/dist/models/client.d.ts +57 -58
- package/dist/models/config.d.ts +48 -48
- package/dist/models/crypto.d.ts +11 -11
- package/dist/models/embedded-flow.d.ts +10 -10
- package/dist/models/field.d.ts +8 -8
- package/dist/models/oidc-discovery.d.ts +161 -161
- package/dist/models/oidc-endpoints.d.ts +15 -15
- package/dist/models/platforms.d.ts +2 -2
- package/dist/models/scim2-schema.d.ts +17 -17
- package/dist/models/session.d.ts +4 -4
- package/dist/models/store.d.ts +9 -9
- package/dist/models/user.d.ts +5 -5
- package/dist/models/v2/embedded-flow-v2.d.ts +86 -86
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +39 -39
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +42 -42
- package/dist/theme/types.d.ts +133 -133
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts +3 -3
- package/dist/utils/logger.d.ts +6 -6
- package/dist/utils/processUsername.d.ts +1 -1
- package/package.json +1 -1
- package/dist/utils/cryptoUtils.d.ts +0 -0
|
@@ -20,20 +20,20 @@
|
|
|
20
20
|
*/
|
|
21
21
|
declare const ApplicationNativeAuthenticationConstants: {
|
|
22
22
|
readonly SupportedAuthenticators: {
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
23
|
+
readonly EmailOtp: string;
|
|
24
|
+
readonly Facebook: string;
|
|
25
|
+
readonly GitHub: string;
|
|
26
|
+
readonly Google: string;
|
|
27
|
+
readonly IdentifierFirst: string;
|
|
28
|
+
readonly LinkedIn: string;
|
|
29
|
+
readonly MagicLink: string;
|
|
30
|
+
readonly Microsoft: string;
|
|
31
|
+
readonly Passkey: string;
|
|
32
|
+
readonly PushNotification: string;
|
|
33
|
+
readonly SignInWithEthereum: string;
|
|
34
|
+
readonly SmsOtp: string;
|
|
35
|
+
readonly Totp: string;
|
|
36
|
+
readonly UsernamePassword: string;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
export default ApplicationNativeAuthenticationConstants;
|
|
@@ -35,118 +35,29 @@
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
declare const OIDCDiscoveryConstants: {
|
|
38
|
-
/**
|
|
39
|
-
* Collection of standard OIDC endpoint paths used for authentication flows.
|
|
40
|
-
* These endpoints are relative paths that should be appended to the base URL
|
|
41
|
-
* of your identity provider.
|
|
42
|
-
*/
|
|
43
38
|
readonly Endpoints: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
readonly
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
*/
|
|
53
|
-
readonly SESSION_IFRAME: "/oidc/checksession";
|
|
54
|
-
/**
|
|
55
|
-
* End session endpoint for logout functionality.
|
|
56
|
-
* Used to terminate the user's session and perform logout operations.
|
|
57
|
-
*/
|
|
58
|
-
readonly END_SESSION: "/oidc/logout";
|
|
59
|
-
/**
|
|
60
|
-
* Token issuer endpoint.
|
|
61
|
-
* The endpoint that issues OAuth2/OIDC tokens.
|
|
62
|
-
*/
|
|
63
|
-
readonly ISSUER: "/oauth2/token";
|
|
64
|
-
/**
|
|
65
|
-
* JSON Web Key Set endpoint for key validation.
|
|
66
|
-
* Provides the public keys used to verify token signatures.
|
|
67
|
-
*/
|
|
68
|
-
readonly JWKS: "/oauth2/jwks";
|
|
69
|
-
/**
|
|
70
|
-
* Token revocation endpoint.
|
|
71
|
-
* Used to invalidate access or refresh tokens before they expire.
|
|
72
|
-
*/
|
|
73
|
-
readonly REVOCATION: "/oauth2/revoke";
|
|
74
|
-
/**
|
|
75
|
-
* Token endpoint for obtaining access tokens.
|
|
76
|
-
* Used to exchange authorization codes for access tokens and refresh tokens.
|
|
77
|
-
*/
|
|
78
|
-
readonly TOKEN: "/oauth2/token";
|
|
79
|
-
/**
|
|
80
|
-
* UserInfo endpoint for obtaining user claims.
|
|
81
|
-
* Provides authenticated user information when called with a valid access token.
|
|
82
|
-
*/
|
|
83
|
-
readonly USERINFO: "/oauth2/userinfo";
|
|
39
|
+
readonly AUTHORIZATION: string;
|
|
40
|
+
readonly END_SESSION: string;
|
|
41
|
+
readonly ISSUER: string;
|
|
42
|
+
readonly JWKS: string;
|
|
43
|
+
readonly REVOCATION: string;
|
|
44
|
+
readonly SESSION_IFRAME: string;
|
|
45
|
+
readonly TOKEN: string;
|
|
46
|
+
readonly USERINFO: string;
|
|
84
47
|
};
|
|
85
|
-
/**
|
|
86
|
-
* Storage related constants used for maintaining OIDC state.
|
|
87
|
-
* These constants define the keys used to store OIDC-related data
|
|
88
|
-
* in the browser's storage mechanisms.
|
|
89
|
-
*/
|
|
90
48
|
readonly Storage: {
|
|
91
|
-
/**
|
|
92
|
-
* Storage keys for various OIDC endpoints and configurations.
|
|
93
|
-
* These keys are used to store endpoint URLs and configuration
|
|
94
|
-
* states in the browser's storage.
|
|
95
|
-
*/
|
|
96
49
|
readonly StorageKeys: {
|
|
97
|
-
/**
|
|
98
|
-
* Collection of storage keys for OIDC endpoints.
|
|
99
|
-
* These keys are used to store the discovered endpoint URLs
|
|
100
|
-
* from the OpenID Provider's configuration.
|
|
101
|
-
*/
|
|
102
50
|
readonly Endpoints: {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
readonly
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*/
|
|
112
|
-
readonly TOKEN: "token_endpoint";
|
|
113
|
-
/**
|
|
114
|
-
* Storage key for the revocation endpoint URL.
|
|
115
|
-
* Used to store the URL where token revocation requests should be sent.
|
|
116
|
-
*/
|
|
117
|
-
readonly REVOCATION: "revocation_endpoint";
|
|
118
|
-
/**
|
|
119
|
-
* Storage key for the end session endpoint URL.
|
|
120
|
-
* Used to store the URL where logout requests should be sent.
|
|
121
|
-
*/
|
|
122
|
-
readonly END_SESSION: "end_session_endpoint";
|
|
123
|
-
/**
|
|
124
|
-
* Storage key for the JWKS URI endpoint URL.
|
|
125
|
-
* Used to store the URL where JSON Web Key Sets can be retrieved.
|
|
126
|
-
*/
|
|
127
|
-
readonly JWKS: "jwks_uri";
|
|
128
|
-
/**
|
|
129
|
-
* Storage key for the session check iframe URL.
|
|
130
|
-
* Used to store the URL of the iframe used for session state monitoring.
|
|
131
|
-
*/
|
|
132
|
-
readonly SESSION_IFRAME: "check_session_iframe";
|
|
133
|
-
/**
|
|
134
|
-
* Storage key for the issuer identifier URL.
|
|
135
|
-
* Used to store the URL that identifies the OpenID Provider.
|
|
136
|
-
*/
|
|
137
|
-
readonly ISSUER: "issuer";
|
|
138
|
-
/**
|
|
139
|
-
* Storage key for the userinfo endpoint URL.
|
|
140
|
-
* Used to store the URL where user information can be retrieved.
|
|
141
|
-
*/
|
|
142
|
-
readonly USERINFO: "userinfo_endpoint";
|
|
51
|
+
readonly AUTHORIZATION: string;
|
|
52
|
+
readonly END_SESSION: string;
|
|
53
|
+
readonly ISSUER: string;
|
|
54
|
+
readonly JWKS: string;
|
|
55
|
+
readonly REVOCATION: string;
|
|
56
|
+
readonly SESSION_IFRAME: string;
|
|
57
|
+
readonly TOKEN: string;
|
|
58
|
+
readonly USERINFO: string;
|
|
143
59
|
};
|
|
144
|
-
|
|
145
|
-
* Flag to track if OpenID Provider configuration is initiated.
|
|
146
|
-
* Used to determine if the OIDC discovery process has been started.
|
|
147
|
-
* This helps prevent duplicate initialization attempts.
|
|
148
|
-
*/
|
|
149
|
-
readonly OPENID_PROVIDER_CONFIG_INITIATED: "op_config_initiated";
|
|
60
|
+
readonly OPENID_PROVIDER_CONFIG_INITIATED: string;
|
|
150
61
|
};
|
|
151
62
|
};
|
|
152
63
|
};
|
|
@@ -21,58 +21,20 @@
|
|
|
21
21
|
*/
|
|
22
22
|
declare const OIDCRequestConstants: {
|
|
23
23
|
readonly Params: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly AUTHORIZATION_CODE: "code";
|
|
29
|
-
/**
|
|
30
|
-
* Session state parameter used for session management between the client and the OP.
|
|
31
|
-
*/
|
|
32
|
-
readonly SESSION_STATE: "session_state";
|
|
33
|
-
/**
|
|
34
|
-
* State parameter used to maintain state between the request and the callback.
|
|
35
|
-
* Helps in preventing CSRF attacks.
|
|
36
|
-
*/
|
|
37
|
-
readonly STATE: "state";
|
|
38
|
-
/**
|
|
39
|
-
* Indicates whether sign-out was successful during the end-session flow.
|
|
40
|
-
* May be returned by the OP after a logout request.
|
|
41
|
-
*/
|
|
42
|
-
readonly SIGN_OUT_SUCCESS: "sign_out_success";
|
|
24
|
+
readonly AUTHORIZATION_CODE: string;
|
|
25
|
+
readonly SESSION_STATE: string;
|
|
26
|
+
readonly SIGN_OUT_SUCCESS: string;
|
|
27
|
+
readonly STATE: string;
|
|
43
28
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Constants related to the OpenID Connect (OIDC) sign-in flow.
|
|
46
|
-
*/
|
|
47
29
|
readonly SignIn: {
|
|
48
|
-
/**
|
|
49
|
-
* Constants related to the payload of the OIDC sign-in request.
|
|
50
|
-
*/
|
|
51
30
|
readonly Payload: {
|
|
52
|
-
|
|
53
|
-
* The default scopes used in OIDC sign-in requests.
|
|
54
|
-
*/
|
|
55
|
-
readonly DEFAULT_SCOPES: readonly [string, string, string];
|
|
31
|
+
readonly DEFAULT_SCOPES: readonly string[];
|
|
56
32
|
};
|
|
57
33
|
};
|
|
58
|
-
/**
|
|
59
|
-
* Sign-out related constants for managing the end-session flow in OIDC.
|
|
60
|
-
*/
|
|
61
34
|
readonly SignOut: {
|
|
62
|
-
/**
|
|
63
|
-
* Storage-related constants for managing sign-out state.
|
|
64
|
-
*/
|
|
65
35
|
readonly Storage: {
|
|
66
|
-
/**
|
|
67
|
-
* Collection of storage keys used in sign-out implementation
|
|
68
|
-
*/
|
|
69
36
|
readonly StorageKeys: {
|
|
70
|
-
|
|
71
|
-
* Storage key for the sign-out URL.
|
|
72
|
-
* Used to store the complete URL where the user should be redirected after
|
|
73
|
-
* completing the OIDC logout process.
|
|
74
|
-
*/
|
|
75
|
-
readonly SIGN_OUT_URL: "sign_out_url";
|
|
37
|
+
readonly SIGN_OUT_URL: string;
|
|
76
38
|
};
|
|
77
39
|
};
|
|
78
40
|
};
|
|
@@ -33,26 +33,11 @@
|
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
declare const PKCEConstants: {
|
|
36
|
-
readonly DEFAULT_CODE_CHALLENGE_METHOD:
|
|
37
|
-
/**
|
|
38
|
-
* Storage-related constants for managing PKCE state
|
|
39
|
-
*/
|
|
36
|
+
readonly DEFAULT_CODE_CHALLENGE_METHOD: string;
|
|
40
37
|
readonly Storage: {
|
|
41
|
-
/**
|
|
42
|
-
* Collection of storage keys used in PKCE implementation
|
|
43
|
-
*/
|
|
44
38
|
readonly StorageKeys: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* The code verifier is a cryptographically random string that is
|
|
48
|
-
* used to generate the code challenge.
|
|
49
|
-
*/
|
|
50
|
-
readonly CODE_VERIFIER: "pkce_code_verifier";
|
|
51
|
-
/**
|
|
52
|
-
* Separator used in storage keys to create unique identifiers
|
|
53
|
-
* by combining different parts of the key.
|
|
54
|
-
*/
|
|
55
|
-
readonly SEPARATOR: "#";
|
|
39
|
+
readonly CODE_VERIFIER: string;
|
|
40
|
+
readonly SEPARATOR: string;
|
|
56
41
|
};
|
|
57
42
|
};
|
|
58
43
|
};
|
|
@@ -35,41 +35,12 @@
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
declare const TokenConstants: {
|
|
38
|
-
/**
|
|
39
|
-
* Token signature validation constants.
|
|
40
|
-
* Contains configurations related to token signature verification.
|
|
41
|
-
*/
|
|
42
38
|
readonly SignatureValidation: {
|
|
43
|
-
|
|
44
|
-
* Fallback array of supported signature algorithms for OIDC token validation.
|
|
45
|
-
* These values are used when the supported algorithms cannot be retrieved from
|
|
46
|
-
* the .well-known/openid-configuration endpoint.
|
|
47
|
-
*
|
|
48
|
-
* Supported algorithms:
|
|
49
|
-
* - `RS256` - RSASSA-PKCS1-v1_5 using SHA-256
|
|
50
|
-
* - `RS512` - RSASSA-PKCS1-v1_5 using SHA-512
|
|
51
|
-
* - `RS384` - RSASSA-PKCS1-v1_5 using SHA-384
|
|
52
|
-
* - `PS256` - RSASSA-PSS using SHA-256 and MGF1 with SHA-256
|
|
53
|
-
*/
|
|
54
|
-
readonly SUPPORTED_ALGORITHMS: readonly ["RS256", "RS512", "RS384", "PS256"];
|
|
39
|
+
readonly SUPPORTED_ALGORITHMS: readonly string[];
|
|
55
40
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Storage-related constants for OIDC tokens.
|
|
58
|
-
* Contains keys used to store token-related data in browser storage.
|
|
59
|
-
*/
|
|
60
41
|
readonly Storage: {
|
|
61
|
-
/**
|
|
62
|
-
* Collection of storage keys used in token management.
|
|
63
|
-
* These keys are used to store and retrieve token-related
|
|
64
|
-
* information from browser storage.
|
|
65
|
-
*/
|
|
66
42
|
readonly StorageKeys: {
|
|
67
|
-
|
|
68
|
-
* Key used to store the refresh token timer identifier.
|
|
69
|
-
* This timer is used to schedule token refresh operations
|
|
70
|
-
* before the current token expires.
|
|
71
|
-
*/
|
|
72
|
-
readonly REFRESH_TOKEN_TIMER: "refresh_token_timer";
|
|
43
|
+
readonly REFRESH_TOKEN_TIMER: string;
|
|
73
44
|
};
|
|
74
45
|
};
|
|
75
46
|
};
|
|
@@ -32,37 +32,12 @@
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
declare const TokenExchangeConstants: {
|
|
35
|
-
/**
|
|
36
|
-
* Collection of placeholder strings used in token exchange operations.
|
|
37
|
-
* These placeholders are replaced with actual values when processing
|
|
38
|
-
* token exchange requests.
|
|
39
|
-
*/
|
|
40
35
|
readonly Placeholders: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
readonly
|
|
46
|
-
/**
|
|
47
|
-
* Placeholder for the username in token exchange operations.
|
|
48
|
-
* Used when user identity needs to be included in the exchange.
|
|
49
|
-
*/
|
|
50
|
-
readonly USERNAME: "{{username}}";
|
|
51
|
-
/**
|
|
52
|
-
* Placeholder for OAuth scopes in token exchange requests.
|
|
53
|
-
* Replaced with space-separated scope strings.
|
|
54
|
-
*/
|
|
55
|
-
readonly SCOPES: "{{scopes}}";
|
|
56
|
-
/**
|
|
57
|
-
* Placeholder for client ID in token exchange operations.
|
|
58
|
-
* Required for client authentication.
|
|
59
|
-
*/
|
|
60
|
-
readonly CLIENT_ID: "{{clientId}}";
|
|
61
|
-
/**
|
|
62
|
-
* Placeholder for client secret in token exchange operations.
|
|
63
|
-
* Used for client authentication in confidential client flows.
|
|
64
|
-
*/
|
|
65
|
-
readonly CLIENT_SECRET: "{{clientSecret}}";
|
|
36
|
+
readonly ACCESS_TOKEN: string;
|
|
37
|
+
readonly CLIENT_ID: string;
|
|
38
|
+
readonly CLIENT_SECRET: string;
|
|
39
|
+
readonly SCOPES: string;
|
|
40
|
+
readonly USERNAME: string;
|
|
66
41
|
};
|
|
67
42
|
};
|
|
68
43
|
export default TokenExchangeConstants;
|