@asgardeo/javascript 0.0.1 → 0.1.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/README.md +3 -3
- package/dist/AsgardeoJavaScriptClient.d.ts +2 -1
- package/dist/IsomorphicCrypto.d.ts +4 -4
- package/dist/{__legacy__/data/data-layer.d.ts → StorageManager.d.ts} +26 -25
- package/dist/__legacy__/client.d.ts +82 -98
- package/dist/__legacy__/helpers/authentication-helper.d.ts +8 -8
- package/dist/__legacy__/models/client-config.d.ts +6 -6
- package/dist/__legacy__/models/index.d.ts +0 -5
- package/dist/api/{oidc/getUserInfo.d.ts → getUserInfo.d.ts} +1 -1
- package/dist/api/handleApplicationNativeAuthentication.d.ts +33 -0
- package/dist/api/initializeApplicationNativeAuthentication.d.ts +117 -0
- package/dist/cjs/index.js +1581 -1188
- package/dist/cjs/index.js.map +4 -4
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +39 -0
- package/dist/constants/OIDCRequestConstants.d.ts +14 -0
- package/dist/constants/PKCEConstants.d.ts +1 -0
- package/dist/constants/TokenExchangeConstants.d.ts +1 -1
- package/dist/{__legacy__/exception → errors}/exception.d.ts +3 -0
- package/dist/{__legacy__/data/index.d.ts → i18n/en-US.d.ts} +4 -2
- package/dist/{__legacy__/exception → i18n}/index.d.ts +2 -2
- package/dist/index.d.ts +28 -10
- package/dist/index.js +1562 -1184
- package/dist/index.js.map +4 -4
- package/dist/models/application-native-authentication.d.ts +82 -0
- package/dist/models/client.d.ts +8 -2
- package/dist/models/config.d.ts +26 -1
- package/dist/models/crypto.d.ts +2 -2
- package/dist/{__legacy__/models/custom-grant.d.ts → models/field.d.ts} +13 -9
- package/dist/models/i18n.d.ts +66 -0
- package/dist/{__legacy__/models/authorization-url.d.ts → models/oauth-request.d.ts} +3 -3
- package/dist/models/oauth-response.d.ts +1 -17
- package/dist/models/scim2-schema.d.ts +3 -0
- package/dist/{__legacy__/models/data.d.ts → models/session.d.ts} +4 -0
- package/dist/models/store.d.ts +1 -1
- package/dist/models/token.d.ts +47 -0
- package/dist/models/user.d.ts +11 -84
- package/dist/theme/types.d.ts +0 -1
- package/dist/utils/deepMerge.d.ts +44 -0
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +1 -1
- package/dist/utils/extractUserClaimsFromIdToken.d.ts +1 -1
- package/dist/utils/flattenUserSchema.d.ts +64 -0
- package/dist/utils/generateFlattenedUserProfile.d.ts +46 -0
- package/dist/utils/generateUserProfile.d.ts +55 -0
- package/dist/utils/get.d.ts +29 -0
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts +59 -0
- package/dist/utils/getI18nBundles.d.ts +26 -0
- package/dist/utils/getLatestStateParam.d.ts +40 -0
- package/dist/utils/processOpenIDScopes.d.ts +36 -0
- package/dist/{__legacy__/core/index.d.ts → utils/resolveFieldName.d.ts} +3 -2
- package/dist/utils/resolveFieldType.d.ts +20 -0
- package/dist/utils/set.d.ts +30 -0
- package/package.json +4 -4
- package/dist/__legacy__/core/authentication-core.d.ts +0 -51
- package/dist/__legacy__/models/fetch.d.ts +0 -55
- package/dist/__legacy__/models/user.d.ts +0 -85
- package/dist/models/id-token.d.ts +0 -55
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
* Constants representing Application Native Authentication related configurations and constants.
|
|
20
|
+
*/
|
|
21
|
+
declare const ApplicationNativeAuthenticationConstants: {
|
|
22
|
+
readonly SupportedAuthenticators: {
|
|
23
|
+
readonly IdentifierFirst: "SWRlbnRpZmllckV4ZWN1dG9yOkxPQ0FM";
|
|
24
|
+
readonly EmailOtp: "ZW1haWwtb3RwLWF1dGhlbnRpY2F0b3I6TE9DQUw";
|
|
25
|
+
readonly Totp: "dG90cDpMT0NBTA";
|
|
26
|
+
readonly UsernamePassword: "QmFzaWNBdXRoZW50aWNhdG9yOkxPQ0FM";
|
|
27
|
+
readonly PushNotification: "cHVzaC1ub3RpZmljYXRpb24tYXV0aGVudGljYXRvcjpMT0NBTA";
|
|
28
|
+
readonly Passkey: "RklET0F1dGhlbnRpY2F0b3I6TE9DQUw";
|
|
29
|
+
readonly SmsOtp: "c21zLW90cC1hdXRoZW50aWNhdG9yOkxPQ0FM";
|
|
30
|
+
readonly MagicLink: "TWFnaWNMaW5rQXV0aGVudGljYXRvcjpMT0NBTA";
|
|
31
|
+
readonly Google: "R29vZ2xlT0lEQ0F1dGhlbnRpY2F0b3I6R29vZ2xl";
|
|
32
|
+
readonly GitHub: "R2l0aHViQXV0aGVudGljYXRvcjpHaXRIdWI";
|
|
33
|
+
readonly Microsoft: "T3BlbklEQ29ubmVjdEF1dGhlbnRpY2F0b3I6TWljcm9zb2Z0";
|
|
34
|
+
readonly Facebook: "RmFjZWJvb2tBdXRoZW50aWNhdG9yOkZhY2Vib29r";
|
|
35
|
+
readonly LinkedIn: "TGlua2VkSW5PSURDOkxpbmtlZElu";
|
|
36
|
+
readonly SignInWithEthereum: "T3BlbklEQ29ubmVjdEF1dGhlbnRpY2F0b3I6U2lnbiBJbiBXaXRoIEV0aGVyZXVt";
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default ApplicationNativeAuthenticationConstants;
|
|
@@ -41,6 +41,20 @@ declare const OIDCRequestConstants: {
|
|
|
41
41
|
*/
|
|
42
42
|
readonly SIGN_OUT_SUCCESS: "sign_out_success";
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Constants related to the OpenID Connect (OIDC) sign-in flow.
|
|
46
|
+
*/
|
|
47
|
+
readonly SignIn: {
|
|
48
|
+
/**
|
|
49
|
+
* Constants related to the payload of the OIDC sign-in request.
|
|
50
|
+
*/
|
|
51
|
+
readonly Payload: {
|
|
52
|
+
/**
|
|
53
|
+
* The default scopes used in OIDC sign-in requests.
|
|
54
|
+
*/
|
|
55
|
+
readonly DEFAULT_SCOPES: readonly ["openid"];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
44
58
|
/**
|
|
45
59
|
* Sign-out related constants for managing the end-session flow in OIDC.
|
|
46
60
|
*/
|
|
@@ -57,7 +57,7 @@ declare const TokenExchangeConstants: {
|
|
|
57
57
|
* Placeholder for client ID in token exchange operations.
|
|
58
58
|
* Required for client authentication.
|
|
59
59
|
*/
|
|
60
|
-
readonly CLIENT_ID: "{{
|
|
60
|
+
readonly CLIENT_ID: "{{clientId}}";
|
|
61
61
|
/**
|
|
62
62
|
* Placeholder for client secret in token exchange operations.
|
|
63
63
|
* Used for client authentication in confidential client flows.
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `AsgardeoRuntimeError` for runtime errors and `AsgardeoAPIError` for API errors.
|
|
20
|
+
*/
|
|
18
21
|
export declare class AsgardeoAuthException {
|
|
19
22
|
name: string;
|
|
20
23
|
code: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, 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
|
|
@@ -15,4 +15,6 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
import { I18nBundle } from '../models/i18n';
|
|
19
|
+
declare const en_US: I18nBundle;
|
|
20
|
+
export default en_US;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025, 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
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export { default as en_US } from './en-US';
|
package/dist/index.d.ts
CHANGED
|
@@ -17,29 +17,47 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export * from './__legacy__/client';
|
|
19
19
|
export * from './__legacy__/models';
|
|
20
|
-
export * from './models/oauth-response';
|
|
21
20
|
export * from './IsomorphicCrypto';
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export { default as getUserInfo } from './api/
|
|
21
|
+
export { default as initializeApplicationNativeAuthentication } from './api/initializeApplicationNativeAuthentication';
|
|
22
|
+
export { default as handleApplicationNativeAuthentication } from './api/handleApplicationNativeAuthentication';
|
|
23
|
+
export { default as getUserInfo } from './api/getUserInfo';
|
|
24
|
+
export { default as ApplicationNativeAuthenticationConstants } from './constants/ApplicationNativeAuthenticationConstants';
|
|
25
25
|
export { default as TokenConstants } from './constants/TokenConstants';
|
|
26
26
|
export { default as OIDCRequestConstants } from './constants/OIDCRequestConstants';
|
|
27
27
|
export { default as AsgardeoError } from './errors/AsgardeoError';
|
|
28
28
|
export { default as AsgardeoAPIError } from './errors/AsgardeoAPIError';
|
|
29
29
|
export { default as AsgardeoRuntimeError } from './errors/AsgardeoRuntimeError';
|
|
30
|
+
export { AsgardeoAuthException } from './errors/exception';
|
|
31
|
+
export { ApplicationNativeAuthenticationInitiateResponse, ApplicationNativeAuthenticationFlowStatus, ApplicationNativeAuthenticationFlowType, ApplicationNativeAuthenticationStepType, ApplicationNativeAuthenticationAuthenticator, ApplicationNativeAuthenticationLink, ApplicationNativeAuthenticationHandleRequestPayload, ApplicationNativeAuthenticationHandleResponse, ApplicationNativeAuthenticationAuthenticatorParamType, ApplicationNativeAuthenticationAuthenticatorPromptType, ApplicationNativeAuthenticationAuthenticatorKnownIdPType, } from './models/application-native-authentication';
|
|
30
32
|
export { AsgardeoClient, SignInOptions, SignOutOptions } from './models/client';
|
|
31
|
-
export { BaseConfig, Config, Preferences, ThemePreferences } from './models/config';
|
|
32
|
-
export { TokenResponse } from './models/token';
|
|
33
|
+
export { BaseConfig, Config, Preferences, ThemePreferences, I18nPreferences, WithPreferences } from './models/config';
|
|
34
|
+
export { TokenResponse, IdTokenPayload, TokenExchangeRequestConfig } from './models/token';
|
|
33
35
|
export { Crypto, JWKInterface } from './models/crypto';
|
|
34
|
-
export {
|
|
36
|
+
export { OAuthResponseMode } from './models/oauth-response';
|
|
37
|
+
export { AuthorizeRequestUrlParams, KnownExtendedAuthorizeRequestUrlParams, ExtendedAuthorizeRequestUrlParams, } from './models/oauth-request';
|
|
35
38
|
export { OIDCEndpoints } from './models/oidc-endpoints';
|
|
36
|
-
export {
|
|
37
|
-
export { User } from './models/user';
|
|
38
|
-
export {
|
|
39
|
+
export { Storage, TemporaryStore } from './models/store';
|
|
40
|
+
export { User, UserProfile } from './models/user';
|
|
41
|
+
export { SessionData } from './models/session';
|
|
42
|
+
export { Schema, SchemaAttribute, WellKnownSchemaIds, FlattenedSchema } from './models/scim2-schema';
|
|
39
43
|
export { RecursivePartial } from './models/utility-types';
|
|
44
|
+
export { FieldType } from './models/field';
|
|
45
|
+
export { I18nBundle, I18nTranslations, I18nMetadata } from './models/i18n';
|
|
40
46
|
export { default as AsgardeoJavaScriptClient } from './AsgardeoJavaScriptClient';
|
|
41
47
|
export { default as createTheme } from './theme/createTheme';
|
|
42
48
|
export { ThemeColors, ThemeConfig, Theme, ThemeMode } from './theme/types';
|
|
49
|
+
export { default as deepMerge } from './utils/deepMerge';
|
|
43
50
|
export { default as extractUserClaimsFromIdToken } from './utils/extractUserClaimsFromIdToken';
|
|
44
51
|
export { default as extractPkceStorageKeyFromState } from './utils/extractPkceStorageKeyFromState';
|
|
52
|
+
export { default as flattenUserSchema } from './utils/flattenUserSchema';
|
|
53
|
+
export { default as generateUserProfile } from './utils/generateUserProfile';
|
|
54
|
+
export { default as getLatestStateParam } from './utils/getLatestStateParam';
|
|
55
|
+
export { default as generateFlattenedUserProfile } from './utils/generateFlattenedUserProfile';
|
|
56
|
+
export { default as getI18nBundles } from './utils/getI18nBundles';
|
|
57
|
+
export { default as set } from './utils/set';
|
|
58
|
+
export { default as get } from './utils/get';
|
|
45
59
|
export { default as removeTrailingSlash } from './utils/removeTrailingSlash';
|
|
60
|
+
export { default as resolveFieldType } from './utils/resolveFieldType';
|
|
61
|
+
export { default as resolveFieldName } from './utils/resolveFieldName';
|
|
62
|
+
export { default as processOpenIDScopes } from './utils/processOpenIDScopes';
|
|
63
|
+
export { default as StorageManager } from './StorageManager';
|