@thunderid/nextjs 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.
- package/LICENSE +201 -0
- package/dist/SessionManager-CmqWChPm.js +1384 -0
- package/dist/cache-CxW8LP5j.js +7893 -0
- package/dist/cjs/SessionManager-RFfauUwH.js +1397 -0
- package/dist/cjs/cache-TPlce_OL.js +7896 -0
- package/dist/cjs/dynamic-rendering-L2d7BrDx.js +1540 -0
- package/dist/cjs/getAccessToken-Cse753Fb.js +22 -0
- package/dist/cjs/getSessionId-0NYmTSk-.js +5 -0
- package/dist/cjs/getSessionId-CTcwNOBu.js +28 -0
- package/dist/cjs/index.cjs +1033 -0
- package/dist/cjs/index2.cjs +8 -0
- package/dist/cjs/middleware.cjs +5147 -0
- package/dist/cjs/segment-oJYpzazg.js +52 -0
- package/dist/cjs/server-DhPu4EWA.js +2477 -0
- package/dist/dynamic-rendering-qQ5hSvc6.js +1441 -0
- package/dist/getAccessToken-tip3mkrS.js +22 -0
- package/dist/getSessionId-CgVEEnja.js +23 -0
- package/dist/getSessionId-dhNlHUsz.js +5 -0
- package/dist/index.js +977 -0
- package/dist/index2.js +7 -0
- package/dist/middleware.js +5148 -0
- package/dist/segment-BliKCoQf.js +47 -0
- package/dist/server-BUTC5fQO.js +2433 -0
- package/dist/types/ThunderIDNextClient.d.ts +94 -0
- package/dist/types/ThunderIDNextClient.d.ts.map +1 -0
- package/dist/types/client/components/actions/SignInButton/SignInButton.d.ts +55 -0
- package/dist/types/client/components/actions/SignInButton/SignInButton.d.ts.map +1 -0
- package/dist/types/client/components/actions/SignOutButton/SignOutButton.d.ts +43 -0
- package/dist/types/client/components/actions/SignOutButton/SignOutButton.d.ts.map +1 -0
- package/dist/types/client/components/actions/SignUpButton/SignUpButton.d.ts +67 -0
- package/dist/types/client/components/actions/SignUpButton/SignUpButton.d.ts.map +1 -0
- package/dist/types/client/components/control/Loading/Loading.d.ts +48 -0
- package/dist/types/client/components/control/Loading/Loading.d.ts.map +1 -0
- package/dist/types/client/components/control/SignedIn/SignedIn.d.ts +46 -0
- package/dist/types/client/components/control/SignedIn/SignedIn.d.ts.map +1 -0
- package/dist/types/client/components/control/SignedOut/SignedOut.d.ts +46 -0
- package/dist/types/client/components/control/SignedOut/SignedOut.d.ts.map +1 -0
- package/dist/types/client/components/presentation/CreateOrganization/CreateOrganization.d.ts +68 -0
- package/dist/types/client/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +1 -0
- package/dist/types/client/components/presentation/Organization/Organization.d.ts +67 -0
- package/dist/types/client/components/presentation/Organization/Organization.d.ts.map +1 -0
- package/dist/types/client/components/presentation/OrganizationList/OrganizationList.d.ts +93 -0
- package/dist/types/client/components/presentation/OrganizationList/OrganizationList.d.ts.map +1 -0
- package/dist/types/client/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +120 -0
- package/dist/types/client/components/presentation/OrganizationProfile/OrganizationProfile.d.ts.map +1 -0
- package/dist/types/client/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +72 -0
- package/dist/types/client/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +1 -0
- package/dist/types/client/components/presentation/SignIn/SignIn.d.ts +70 -0
- package/dist/types/client/components/presentation/SignIn/SignIn.d.ts.map +1 -0
- package/dist/types/client/components/presentation/SignUp/SignUp.d.ts +56 -0
- package/dist/types/client/components/presentation/SignUp/SignUp.d.ts.map +1 -0
- package/dist/types/client/components/presentation/User/User.d.ts +62 -0
- package/dist/types/client/components/presentation/User/User.d.ts.map +1 -0
- package/dist/types/client/components/presentation/UserDropdown/UserDropdown.d.ts +106 -0
- package/dist/types/client/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -0
- package/dist/types/client/components/presentation/UserProfile/UserProfile.d.ts +50 -0
- package/dist/types/client/components/presentation/UserProfile/UserProfile.d.ts.map +1 -0
- package/dist/types/client/contexts/ThunderID/ThunderIDContext.d.ts +33 -0
- package/dist/types/client/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -0
- package/dist/types/client/contexts/ThunderID/ThunderIDProvider.d.ts +59 -0
- package/dist/types/client/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -0
- package/dist/types/client/contexts/ThunderID/useThunderID.d.ts +21 -0
- package/dist/types/client/contexts/ThunderID/useThunderID.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +47 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/configs/InternalAuthAPIRoutesConfig.d.ts +21 -0
- package/dist/types/configs/InternalAuthAPIRoutesConfig.d.ts.map +1 -0
- package/dist/types/constants/sessionConstants.d.ts +49 -0
- package/dist/types/constants/sessionConstants.d.ts.map +1 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/middleware.d.ts +35 -0
- package/dist/types/middleware.d.ts.map +1 -0
- package/dist/types/models/api.d.ts +49 -0
- package/dist/types/models/api.d.ts.map +1 -0
- package/dist/types/models/config.d.ts +31 -0
- package/dist/types/models/config.d.ts.map +1 -0
- package/dist/types/server/ThunderIDProvider.d.ts +58 -0
- package/dist/types/server/ThunderIDProvider.d.ts.map +1 -0
- package/dist/types/server/actions/clearSession.d.ts +40 -0
- package/dist/types/server/actions/clearSession.d.ts.map +1 -0
- package/dist/types/server/actions/createOrganization.d.ts +24 -0
- package/dist/types/server/actions/createOrganization.d.ts.map +1 -0
- package/dist/types/server/actions/getAccessToken.d.ts +25 -0
- package/dist/types/server/actions/getAccessToken.d.ts.map +1 -0
- package/dist/types/server/actions/getAllOrganizations.d.ts +24 -0
- package/dist/types/server/actions/getAllOrganizations.d.ts.map +1 -0
- package/dist/types/server/actions/getBrandingPreference.d.ts +24 -0
- package/dist/types/server/actions/getBrandingPreference.d.ts.map +1 -0
- package/dist/types/server/actions/getClientOrigin.d.ts +20 -0
- package/dist/types/server/actions/getClientOrigin.d.ts.map +1 -0
- package/dist/types/server/actions/getCurrentOrganizationAction.d.ts +31 -0
- package/dist/types/server/actions/getCurrentOrganizationAction.d.ts.map +1 -0
- package/dist/types/server/actions/getMyOrganizations.d.ts +24 -0
- package/dist/types/server/actions/getMyOrganizations.d.ts.map +1 -0
- package/dist/types/server/actions/getOrganizationAction.d.ts +31 -0
- package/dist/types/server/actions/getOrganizationAction.d.ts.map +1 -0
- package/dist/types/server/actions/getSessionId.d.ts +26 -0
- package/dist/types/server/actions/getSessionId.d.ts.map +1 -0
- package/dist/types/server/actions/getSessionPayload.d.ts +27 -0
- package/dist/types/server/actions/getSessionPayload.d.ts.map +1 -0
- package/dist/types/server/actions/getUserAction.d.ts +31 -0
- package/dist/types/server/actions/getUserAction.d.ts.map +1 -0
- package/dist/types/server/actions/getUserProfileAction.d.ts +31 -0
- package/dist/types/server/actions/getUserProfileAction.d.ts.map +1 -0
- package/dist/types/server/actions/handleOAuthCallbackAction.d.ts +34 -0
- package/dist/types/server/actions/handleOAuthCallbackAction.d.ts.map +1 -0
- package/dist/types/server/actions/isSignedIn.d.ts +32 -0
- package/dist/types/server/actions/isSignedIn.d.ts.map +1 -0
- package/dist/types/server/actions/refreshToken.d.ts +45 -0
- package/dist/types/server/actions/refreshToken.d.ts.map +1 -0
- package/dist/types/server/actions/signInAction.d.ts +36 -0
- package/dist/types/server/actions/signInAction.d.ts.map +1 -0
- package/dist/types/server/actions/signOutAction.d.ts +32 -0
- package/dist/types/server/actions/signOutAction.d.ts.map +1 -0
- package/dist/types/server/actions/signUpAction.d.ts +36 -0
- package/dist/types/server/actions/signUpAction.d.ts.map +1 -0
- package/dist/types/server/actions/switchOrganization.d.ts +24 -0
- package/dist/types/server/actions/switchOrganization.d.ts.map +1 -0
- package/dist/types/server/actions/updateUserProfileAction.d.ts +31 -0
- package/dist/types/server/actions/updateUserProfileAction.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +21 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/middleware/createRouteMatcher.d.ts +40 -0
- package/dist/types/server/middleware/createRouteMatcher.d.ts.map +1 -0
- package/dist/types/server/middleware/thunderIDMiddleware.d.ts +93 -0
- package/dist/types/server/middleware/thunderIDMiddleware.d.ts.map +1 -0
- package/dist/types/server/thunderid.d.ts +27 -0
- package/dist/types/server/thunderid.d.ts.map +1 -0
- package/dist/types/utils/SessionManager.d.ts +115 -0
- package/dist/types/utils/SessionManager.d.ts.map +1 -0
- package/dist/types/utils/createRouteMatcher.d.ts +39 -0
- package/dist/types/utils/createRouteMatcher.d.ts.map +1 -0
- package/dist/types/utils/decorateConfigWithNextEnv.d.ts +21 -0
- package/dist/types/utils/decorateConfigWithNextEnv.d.ts.map +1 -0
- package/dist/types/utils/handleRefreshToken.d.ts +47 -0
- package/dist/types/utils/handleRefreshToken.d.ts.map +1 -0
- package/dist/types/utils/logger.d.ts +20 -0
- package/dist/types/utils/logger.d.ts.map +1 -0
- package/dist/types/utils/sessionUtils.d.ts +51 -0
- package/dist/types/utils/sessionUtils.d.ts.map +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import { ThunderIDContextProps as ReactContextProps } from '@thunderid/react';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
import { RefreshResult } from '../../../server/actions/refreshToken';
|
|
21
|
+
/**
|
|
22
|
+
* Props interface of {@link ThunderIDContext}
|
|
23
|
+
*/
|
|
24
|
+
export type ThunderIDContextProps = Partial<ReactContextProps> & {
|
|
25
|
+
clearSession?: () => Promise<void>;
|
|
26
|
+
refreshToken?: () => Promise<RefreshResult>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Context object for managing the Authentication flow builder core context.
|
|
30
|
+
*/
|
|
31
|
+
declare const ThunderIDContext: Context<ThunderIDContextProps | null>;
|
|
32
|
+
export default ThunderIDContext;
|
|
33
|
+
//# sourceMappingURL=ThunderIDContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThunderIDContext.d.ts","sourceRoot":"","sources":["../../../../../src/client/contexts/ThunderID/ThunderIDContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,qBAAqB,IAAI,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,sCAAsC,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,GAAG;IAC/D,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gBAAgB,EAAE,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAgB1D,CAAC;AAIH,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
import { AllOrganizationsApiResponse, Organization, UpdateMeProfileConfig, User, UserProfile, BrandingPreference, TokenResponse, CreateOrganizationPayload } from '@thunderid/node';
|
|
19
|
+
import { ThunderIDProviderProps } from '@thunderid/react';
|
|
20
|
+
import { FC, PropsWithChildren } from 'react';
|
|
21
|
+
import { ThunderIDContextProps } from './ThunderIDContext';
|
|
22
|
+
import { RefreshResult } from '../../../server/actions/refreshToken';
|
|
23
|
+
/**
|
|
24
|
+
* Props interface of {@link ThunderIDClientProvider}
|
|
25
|
+
*/
|
|
26
|
+
export type ThunderIDClientProviderProps = Partial<Omit<ThunderIDProviderProps, 'baseUrl' | 'clientId'>> & Pick<ThunderIDProviderProps, 'baseUrl' | 'clientId'> & {
|
|
27
|
+
applicationId: ThunderIDContextProps['applicationId'];
|
|
28
|
+
brandingPreference?: BrandingPreference | null;
|
|
29
|
+
clearSession: () => Promise<void>;
|
|
30
|
+
createOrganization: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;
|
|
31
|
+
currentOrganization: Organization;
|
|
32
|
+
getAllOrganizations: (options?: any, sessionId?: string) => Promise<AllOrganizationsApiResponse>;
|
|
33
|
+
handleOAuthCallback: (code: string, state: string, sessionState?: string) => Promise<{
|
|
34
|
+
error?: string;
|
|
35
|
+
redirectUrl?: string;
|
|
36
|
+
success: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
isSignedIn: boolean;
|
|
39
|
+
myOrganizations: Organization[];
|
|
40
|
+
organizationHandle: ThunderIDContextProps['organizationHandle'];
|
|
41
|
+
refreshToken: () => Promise<RefreshResult>;
|
|
42
|
+
revalidateMyOrganizations?: (sessionId?: string) => Promise<Organization[]>;
|
|
43
|
+
signIn: ThunderIDContextProps['signIn'];
|
|
44
|
+
signOut: ThunderIDContextProps['signOut'];
|
|
45
|
+
signUp: ThunderIDContextProps['signUp'];
|
|
46
|
+
switchOrganization: (organization: Organization, sessionId?: string) => Promise<TokenResponse | Response>;
|
|
47
|
+
updateProfile: (requestConfig: UpdateMeProfileConfig, sessionId?: string) => Promise<{
|
|
48
|
+
data: {
|
|
49
|
+
user: User;
|
|
50
|
+
};
|
|
51
|
+
error: string;
|
|
52
|
+
success: boolean;
|
|
53
|
+
}>;
|
|
54
|
+
user: User | null;
|
|
55
|
+
userProfile: UserProfile;
|
|
56
|
+
};
|
|
57
|
+
declare const ThunderIDClientProvider: FC<PropsWithChildren<ThunderIDClientProviderProps>>;
|
|
58
|
+
export default ThunderIDClientProvider;
|
|
59
|
+
//# sourceMappingURL=ThunderIDProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../../../../src/client/contexts/ThunderID/ThunderIDProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EACL,2BAA2B,EAK3B,YAAY,EACZ,qBAAqB,EACrB,IAAI,EACJ,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EAE1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAKL,sBAAsB,EAIvB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAkD,MAAM,OAAO,CAAC;AAC7F,OAAyB,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAC,aAAa,EAAC,MAAM,sCAAsC,CAAC;AAGnE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC,GACtG,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,UAAU,CAAC,GAAG;IACrD,aAAa,EAAE,qBAAqB,CAAC,eAAe,CAAC,CAAC;IACtD,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC/C,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,kBAAkB,EAAE,CAAC,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACrG,mBAAmB,EAAE,YAAY,CAAC;IAClC,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACjG,mBAAmB,EAAE,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,KAClB,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IACvE,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,YAAY,EAAE,CAAC;IAChC,kBAAkB,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;IAChE,YAAY,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC;IAC3C,yBAAyB,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC5E,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC1C,MAAM,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACxC,kBAAkB,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,GAAG,QAAQ,CAAC,CAAC;IAC1G,aAAa,EAAE,CACb,aAAa,EAAE,qBAAqB,EACpC,SAAS,CAAC,EAAE,MAAM,KACf,OAAO,CAAC;QAAC,IAAI,EAAE;YAAC,IAAI,EAAE,IAAI,CAAA;SAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAC,CAAC,CAAC;IACpE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEJ,QAAA,MAAM,uBAAuB,EAAE,EAAE,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,CAyQhF,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { ThunderIDContextProps } from './ThunderIDContext';
|
|
19
|
+
declare const useThunderID: () => ThunderIDContextProps;
|
|
20
|
+
export default useThunderID;
|
|
21
|
+
//# sourceMappingURL=useThunderID.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useThunderID.d.ts","sourceRoot":"","sources":["../../../../../src/client/contexts/ThunderID/useThunderID.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAyB,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAE3E,QAAA,MAAM,YAAY,QAAO,qBAQxB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { default as useThunderID } from './contexts/ThunderID/useThunderID';
|
|
19
|
+
export { default as Organization } from './components/presentation/Organization/Organization';
|
|
20
|
+
export { OrganizationProps } from './components/presentation/Organization/Organization';
|
|
21
|
+
export { default as CreateOrganization } from './components/presentation/CreateOrganization/CreateOrganization';
|
|
22
|
+
export { CreateOrganizationProps } from './components/presentation/CreateOrganization/CreateOrganization';
|
|
23
|
+
export { default as OrganizationProfile } from './components/presentation/OrganizationProfile/OrganizationProfile';
|
|
24
|
+
export { OrganizationProfileProps } from './components/presentation/OrganizationProfile/OrganizationProfile';
|
|
25
|
+
export { default as OrganizationSwitcher } from './components/presentation/OrganizationSwitcher/OrganizationSwitcher';
|
|
26
|
+
export { OrganizationSwitcherProps } from './components/presentation/OrganizationSwitcher/OrganizationSwitcher';
|
|
27
|
+
export { default as SignedIn } from './components/control/SignedIn/SignedIn';
|
|
28
|
+
export { SignedInProps } from './components/control/SignedIn/SignedIn';
|
|
29
|
+
export { default as SignedOut } from './components/control/SignedOut/SignedOut';
|
|
30
|
+
export { SignedOutProps } from './components/control/SignedOut/SignedOut';
|
|
31
|
+
export { default as SignInButton } from './components/actions/SignInButton/SignInButton';
|
|
32
|
+
export type { SignInButtonProps } from './components/actions/SignInButton/SignInButton';
|
|
33
|
+
export { default as SignUpButton } from './components/actions/SignUpButton/SignUpButton';
|
|
34
|
+
export type { SignUpButtonProps } from './components/actions/SignUpButton/SignUpButton';
|
|
35
|
+
export { default as SignIn } from './components/presentation/SignIn/SignIn';
|
|
36
|
+
export type { SignInProps } from './components/presentation/SignIn/SignIn';
|
|
37
|
+
export { default as SignOutButton } from './components/actions/SignOutButton/SignOutButton';
|
|
38
|
+
export type { SignOutButtonProps } from './components/actions/SignOutButton/SignOutButton';
|
|
39
|
+
export { default as User } from './components/presentation/User/User';
|
|
40
|
+
export type { UserProps } from './components/presentation/User/User';
|
|
41
|
+
export { default as SignUp } from './components/presentation/SignUp/SignUp';
|
|
42
|
+
export type { SignUpProps } from './components/presentation/SignUp/SignUp';
|
|
43
|
+
export { default as UserDropdown } from './components/presentation/UserDropdown/UserDropdown';
|
|
44
|
+
export type { UserDropdownProps } from './components/presentation/UserDropdown/UserDropdown';
|
|
45
|
+
export { default as UserProfile } from './components/presentation/UserProfile/UserProfile';
|
|
46
|
+
export type { UserProfileProps } from './components/presentation/UserProfile/UserProfile';
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAC,iBAAiB,EAAC,MAAM,qDAAqD,CAAC;AAEtF,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,iEAAiE,CAAC;AAC9G,OAAO,EAAC,uBAAuB,EAAC,MAAM,iEAAiE,CAAC;AAExG,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,mEAAmE,CAAC;AACjH,OAAO,EAAC,wBAAwB,EAAC,MAAM,mEAAmE,CAAC;AAE3G,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,qEAAqE,CAAC;AACpH,OAAO,EAAC,yBAAyB,EAAC,MAAM,qEAAqE,CAAC;AAE9G,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAC,cAAc,EAAC,MAAM,0CAA0C,CAAC;AAExE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gDAAgD,CAAC;AACvF,YAAY,EAAC,iBAAiB,EAAC,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,gDAAgD,CAAC;AACvF,YAAY,EAAC,iBAAiB,EAAC,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,yCAAyC,CAAC;AAC1E,YAAY,EAAC,WAAW,EAAC,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,kDAAkD,CAAC;AAC1F,YAAY,EAAC,kBAAkB,EAAC,MAAM,kDAAkD,CAAC;AAEzF,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,qCAAqC,CAAC;AACpE,YAAY,EAAC,SAAS,EAAC,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,yCAAyC,CAAC;AAC1E,YAAY,EAAC,WAAW,EAAC,MAAM,yCAAyC,CAAC;AAEzE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,qDAAqD,CAAC;AAC5F,YAAY,EAAC,iBAAiB,EAAC,MAAM,qDAAqD,CAAC;AAE3F,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,mDAAmD,CAAC;AACzF,YAAY,EAAC,gBAAgB,EAAC,MAAM,mDAAmD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { InternalAuthAPIRoutes } from '../models/api';
|
|
19
|
+
declare const InternalAuthAPIRoutesConfig: InternalAuthAPIRoutes;
|
|
20
|
+
export default InternalAuthAPIRoutesConfig;
|
|
21
|
+
//# sourceMappingURL=InternalAuthAPIRoutesConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InternalAuthAPIRoutesConfig.d.ts","sourceRoot":"","sources":["../../../src/configs/InternalAuthAPIRoutesConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AAEpD,QAAA,MAAM,2BAA2B,EAAE,qBAMlC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
* Number of seconds before access token expiry at which the SDK proactively
|
|
20
|
+
* refreshes the token. A 25-second buffer prevents races where the token is
|
|
21
|
+
* valid when a request starts but expires mid-flight.
|
|
22
|
+
*/
|
|
23
|
+
export declare const REFRESH_BUFFER_SECONDS = 25;
|
|
24
|
+
/**
|
|
25
|
+
* Default session cookie lifetime in seconds (24 hours).
|
|
26
|
+
*
|
|
27
|
+
* Used when no explicit session cookie expiry is configured. The session cookie
|
|
28
|
+
* lifetime can be overridden in two ways (evaluated in this order):
|
|
29
|
+
*
|
|
30
|
+
* 1. `sessionCookieExpiryTime` in `ThunderIDNodeConfig` — set programmatically
|
|
31
|
+
* when initialising the SDK.
|
|
32
|
+
* 2. `ASGARDEO_SESSION_COOKIE_EXPIRY_TIME` environment variable — set in `.env`
|
|
33
|
+
* (e.g. `ASGARDEO_SESSION_COOKIE_EXPIRY_TIME=86400`).
|
|
34
|
+
* 3. This constant — applied when neither of the above is present.
|
|
35
|
+
*
|
|
36
|
+
* Two independent expiry bounds apply to the session and they are generally
|
|
37
|
+
* NOT the same value:
|
|
38
|
+
*
|
|
39
|
+
* - JWT `exp` claim — set by `SessionManager.createSessionToken(...)` from
|
|
40
|
+
* the `accessTokenTtlSeconds` argument (i.e. the access token's `expires_in`
|
|
41
|
+
* returned by the auth server, typically ~1 hour). This controls when
|
|
42
|
+
* `verifySessionToken` rejects the token and is the trigger for a refresh.
|
|
43
|
+
* - Browser cookie `maxAge` — set by the caller (sign-in / refresh / org-switch
|
|
44
|
+
* actions) from `SessionManager.resolveSessionCookieExpiry(...)`, which returns
|
|
45
|
+
* this constant by default (24 hours). This controls how long the browser
|
|
46
|
+
* holds the cookie before discarding it.
|
|
47
|
+
*/
|
|
48
|
+
export declare const DEFAULT_SESSION_COOKIE_EXPIRY_TIME = 86400;
|
|
49
|
+
//# sourceMappingURL=sessionConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/sessionConstants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,kCAAkC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { default as ThunderIDNext } from './ThunderIDNextClient';
|
|
19
|
+
export * from './server';
|
|
20
|
+
export * from './client';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAG/D,cAAc,UAAU,CAAC;AAGzB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
* Edge Runtime entry point — safe for use in Next.js middleware.ts.
|
|
20
|
+
*
|
|
21
|
+
* This file must only import modules whose full transitive dependency graph
|
|
22
|
+
* contains zero Node.js-only APIs (process.versions, fs, crypto, etc.).
|
|
23
|
+
* Permitted dependencies: jose, fetch, next/server, and local utilities
|
|
24
|
+
* that themselves satisfy the same constraint.
|
|
25
|
+
*
|
|
26
|
+
* Do NOT import from:
|
|
27
|
+
* - ThunderIDNextClient (depends on @thunderid/node → @thunderid/javascript)
|
|
28
|
+
* - server/ThunderIDProvider (depends on @thunderid/node)
|
|
29
|
+
* - server/actions/* (depend on @thunderid/node)
|
|
30
|
+
* - client/* (depend on @thunderid/javascript via @thunderid/react)
|
|
31
|
+
*/
|
|
32
|
+
export { default as thunderIDMiddleware } from './server/middleware/thunderIDMiddleware';
|
|
33
|
+
export * from './server/middleware/thunderIDMiddleware';
|
|
34
|
+
export { default as createRouteMatcher } from './server/middleware/createRouteMatcher';
|
|
35
|
+
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/middleware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,yCAAyC,CAAC;AACvF,cAAc,yCAAyC,CAAC;AAExD,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
* Interface defining the internal API routes for authentication.
|
|
20
|
+
* These routes are used internally by the ThunderID Next.js SDK for handling authentication flows.
|
|
21
|
+
*/
|
|
22
|
+
export interface InternalAuthAPIRoutes {
|
|
23
|
+
/**
|
|
24
|
+
* Route for handling session management.
|
|
25
|
+
* This route should return the current signed-in status.
|
|
26
|
+
*/
|
|
27
|
+
session: string;
|
|
28
|
+
/**
|
|
29
|
+
* Route for handling sign-in requests.
|
|
30
|
+
* This route should handle the sign-in flow and redirect users to the appropriate authentication endpoint.
|
|
31
|
+
*/
|
|
32
|
+
signIn: string;
|
|
33
|
+
/**
|
|
34
|
+
* Route for handling sign-out requests.
|
|
35
|
+
* This route should handle the sign-out flow and clean up any authentication state.
|
|
36
|
+
*/
|
|
37
|
+
signOut: string;
|
|
38
|
+
/**
|
|
39
|
+
* Route for handling sign-up requests.
|
|
40
|
+
* This route should handle the sign-up flow and redirect users to the appropriate registration endpoint.
|
|
41
|
+
*/
|
|
42
|
+
signUp?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Route for handling user information retrieval.
|
|
45
|
+
* This route should return the current user's information, such as username, email, etc.
|
|
46
|
+
*/
|
|
47
|
+
user: string;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/models/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { ThunderIDNodeConfig } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Configuration type for the ThunderID Next.js SDK.
|
|
21
|
+
* Extends ThunderIDNodeConfig to provide Next.js-specific authentication configuration.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* Configuration options include:
|
|
25
|
+
* - Authentication endpoints and parameters
|
|
26
|
+
* - Next.js specific redirects and middleware settings
|
|
27
|
+
* - Session configuration for Next.js apps
|
|
28
|
+
* - Environment variable integration
|
|
29
|
+
*/
|
|
30
|
+
export type ThunderIDNextConfig = ThunderIDNodeConfig;
|
|
31
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/models/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
import { ThunderIDProviderProps } from '@thunderid/react';
|
|
19
|
+
import { FC, PropsWithChildren } from 'react';
|
|
20
|
+
/**
|
|
21
|
+
* Props interface of {@link ThunderIDServerProvider}
|
|
22
|
+
*/
|
|
23
|
+
export type ThunderIDServerProviderProps = Partial<ThunderIDProviderProps> & {
|
|
24
|
+
clientSecret?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Session cookie lifetime in seconds. Determines how long the session cookie
|
|
27
|
+
* remains valid in the browser after sign-in.
|
|
28
|
+
*
|
|
29
|
+
* Resolution order (first defined value wins):
|
|
30
|
+
* 1. This prop — set here when mounting the provider.
|
|
31
|
+
* 2. `ASGARDEO_SESSION_COOKIE_EXPIRY_TIME` environment variable.
|
|
32
|
+
* 3. Built-in default of 86400 seconds (24 hours).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // 8-hour session cookie
|
|
36
|
+
* <ThunderIDServerProvider sessionCookieExpiryTime={28800} ... />
|
|
37
|
+
*/
|
|
38
|
+
sessionCookieExpiryTime?: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Server-side provider component for ThunderID authentication.
|
|
42
|
+
* Wraps the client-side provider and handles server-side authentication logic.
|
|
43
|
+
* Uses the singleton ThunderIDNextClient instance for consistent authentication state.
|
|
44
|
+
*
|
|
45
|
+
* @param props - Props injected into the component.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <ThunderIDServerProvider config={thunderidConfig}>
|
|
50
|
+
* <YourApp />
|
|
51
|
+
* </ThunderIDServerProvider>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @returns ThunderIDServerProvider component.
|
|
55
|
+
*/
|
|
56
|
+
declare const ThunderIDServerProvider: FC<PropsWithChildren<ThunderIDServerProviderProps>>;
|
|
57
|
+
export default ThunderIDServerProvider;
|
|
58
|
+
//# sourceMappingURL=ThunderIDProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThunderIDProvider.d.ts","sourceRoot":"","sources":["../../../src/server/ThunderIDProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAC,sBAAsB,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAe,MAAM,OAAO,CAAC;AAyB1D;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,uBAAuB,EAAE,EAAE,CAAC,iBAAiB,CAAC,4BAA4B,CAAC,CAgKhF,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
* Deletes all ThunderID session cookies from the browser without contacting the
|
|
20
|
+
* identity server.
|
|
21
|
+
*
|
|
22
|
+
* Use this for error-recovery scenarios where the local session must be wiped
|
|
23
|
+
* immediately: refresh token failures, corrupt sessions, or forced local sign-out
|
|
24
|
+
* when the identity server is unreachable.
|
|
25
|
+
*
|
|
26
|
+
* For a complete sign-out that also revokes the server-side session and obtains the
|
|
27
|
+
* after-sign-out redirect URL, use `signOutAction` instead.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* import { clearSession } from '@thunderid/nextjs/server';
|
|
32
|
+
*
|
|
33
|
+
* // Inside a Server Action or Route Handler:
|
|
34
|
+
* await clearSession();
|
|
35
|
+
* redirect('/sign-in');
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare const clearSession: () => Promise<void>;
|
|
39
|
+
export default clearSession;
|
|
40
|
+
//# sourceMappingURL=clearSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearSession.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/clearSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,YAAY,QAAa,OAAO,CAAC,IAAI,CAK1C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { CreateOrganizationPayload, Organization } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to create an organization.
|
|
21
|
+
*/
|
|
22
|
+
declare const createOrganization: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;
|
|
23
|
+
export default createOrganization;
|
|
24
|
+
//# sourceMappingURL=createOrganization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOrganization.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/createOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,yBAAyB,EAAE,YAAY,EAAoB,MAAM,iBAAiB,CAAC;AAI3F;;GAEG;AACH,QAAA,MAAM,kBAAkB,GAAU,SAAS,yBAAyB,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,YAAY,CAY7G,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
* Get the access token from the session cookie.
|
|
20
|
+
*
|
|
21
|
+
* @returns The access token if it exists, undefined otherwise
|
|
22
|
+
*/
|
|
23
|
+
declare const getAccessToken: () => Promise<string | undefined>;
|
|
24
|
+
export default getAccessToken;
|
|
25
|
+
//# sourceMappingURL=getAccessToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAccessToken.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getAccessToken.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH;;;;GAIG;AACH,QAAA,MAAM,cAAc,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAgB1D,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { AllOrganizationsApiResponse } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to get organizations.
|
|
21
|
+
*/
|
|
22
|
+
declare const getAllOrganizations: (options?: any, sessionId?: string) => Promise<AllOrganizationsApiResponse>;
|
|
23
|
+
export default getAllOrganizations;
|
|
24
|
+
//# sourceMappingURL=getAllOrganizations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllOrganizations.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getAllOrganizations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,2BAA2B,EAAoB,MAAM,iBAAiB,CAAC;AAI/E;;GAEG;AACH,QAAA,MAAM,mBAAmB,GAAU,UAAU,GAAG,EAAE,YAAY,MAAM,KAAG,OAAO,CAAC,2BAA2B,CAYzG,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { GetBrandingPreferenceConfig, BrandingPreference } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to get branding preferences.
|
|
21
|
+
*/
|
|
22
|
+
declare const getBrandingPreference: (config: GetBrandingPreferenceConfig, sessionId?: string) => Promise<BrandingPreference>;
|
|
23
|
+
export default getBrandingPreference;
|
|
24
|
+
//# sourceMappingURL=getBrandingPreference.d.ts.map
|