@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 @@
|
|
|
1
|
+
{"version":3,"file":"getBrandingPreference.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getBrandingPreference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAEL,2BAA2B,EAC3B,kBAAkB,EAEnB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,QAAA,MAAM,qBAAqB,GACzB,QAAQ,2BAA2B,EACnC,YAAY,MAAM,KACjB,OAAO,CAAC,kBAAkB,CAa5B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
declare const getClientOrigin: () => Promise<string>;
|
|
19
|
+
export default getClientOrigin;
|
|
20
|
+
//# sourceMappingURL=getClientOrigin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getClientOrigin.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getClientOrigin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,QAAA,MAAM,eAAe,QAAa,OAAO,CAAC,MAAM,CAK/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -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 { Organization } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to create an organization.
|
|
21
|
+
*/
|
|
22
|
+
declare const getCurrentOrganizationAction: (sessionId: string) => Promise<{
|
|
23
|
+
data: {
|
|
24
|
+
organization?: Organization;
|
|
25
|
+
user?: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
error: string | null;
|
|
28
|
+
success: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export default getCurrentOrganizationAction;
|
|
31
|
+
//# sourceMappingURL=getCurrentOrganizationAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCurrentOrganizationAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getCurrentOrganizationAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C;;GAEG;AACH,QAAA,MAAM,4BAA4B,GAChC,WAAW,MAAM,KAChB,OAAO,CAAC;IACT,IAAI,EAAE;QAAC,YAAY,CAAC,EAAE,YAAY,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAC,CAAC;IACpE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CAcA,CAAC;AAEF,eAAe,4BAA4B,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 { Organization } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to get organizations.
|
|
21
|
+
*/
|
|
22
|
+
declare const getMyOrganizations: (options?: any, sessionId?: string) => Promise<Organization[]>;
|
|
23
|
+
export default getMyOrganizations;
|
|
24
|
+
//# sourceMappingURL=getMyOrganizations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMyOrganizations.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getMyOrganizations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAoB,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAGhE;;GAEG;AACH,QAAA,MAAM,kBAAkB,GAAU,UAAU,GAAG,EAAE,YAAY,MAAM,KAAG,OAAO,CAAC,YAAY,EAAE,CAqD3F,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -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 { OrganizationDetails } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to create an organization.
|
|
21
|
+
*/
|
|
22
|
+
declare const getOrganizationAction: (organizationId: string, sessionId: string) => Promise<{
|
|
23
|
+
data: {
|
|
24
|
+
organization?: OrganizationDetails;
|
|
25
|
+
user?: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
error: string | null;
|
|
28
|
+
success: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export default getOrganizationAction;
|
|
31
|
+
//# sourceMappingURL=getOrganizationAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOrganizationAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getOrganizationAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAGpD;;GAEG;AACH,QAAA,MAAM,qBAAqB,GACzB,gBAAgB,MAAM,EACtB,WAAW,MAAM,KAChB,OAAO,CAAC;IACT,IAAI,EAAE;QAAC,YAAY,CAAC,EAAE,mBAAmB,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAC,CAAC;IAC3E,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CAcA,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 session ID from cookies.
|
|
20
|
+
* Tries JWT session first, then falls back to legacy session ID.
|
|
21
|
+
*
|
|
22
|
+
* @returns The session ID if it exists, undefined otherwise
|
|
23
|
+
*/
|
|
24
|
+
declare const getSessionId: () => Promise<string | undefined>;
|
|
25
|
+
export default getSessionId;
|
|
26
|
+
//# sourceMappingURL=getSessionId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSessionId.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getSessionId.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH;;;;;GAKG;AACH,QAAA,MAAM,YAAY,QAAa,OAAO,CAAC,MAAM,GAAG,SAAS,CAgBxD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { SessionTokenPayload } from '../../utils/SessionManager';
|
|
19
|
+
/**
|
|
20
|
+
* Get the session payload from JWT session cookie.
|
|
21
|
+
* This includes user ID, session ID, scopes, and organization ID.
|
|
22
|
+
*
|
|
23
|
+
* @returns The session payload if valid JWT session exists, undefined otherwise
|
|
24
|
+
*/
|
|
25
|
+
declare const getSessionPayload: () => Promise<SessionTokenPayload | undefined>;
|
|
26
|
+
export default getSessionPayload;
|
|
27
|
+
//# sourceMappingURL=getSessionPayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSessionPayload.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getSessionPayload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAuB,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAI/E;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,QAAa,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAa1E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -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 { User } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to get the current user.
|
|
21
|
+
* Returns the user profile if signed in.
|
|
22
|
+
*/
|
|
23
|
+
declare const getUserAction: (sessionId: string) => Promise<{
|
|
24
|
+
data: {
|
|
25
|
+
user: User | null;
|
|
26
|
+
};
|
|
27
|
+
error: string | null;
|
|
28
|
+
success: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export default getUserAction;
|
|
31
|
+
//# sourceMappingURL=getUserAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getUserAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAGrC;;;GAGG;AACH,QAAA,MAAM,aAAa,GACjB,WAAW,MAAM,KAChB,OAAO,CAAC;IAAC,IAAI,EAAE;QAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;KAAC,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAQ7E,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -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 { UserProfile } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to get the current user.
|
|
21
|
+
* Returns the user profile if signed in.
|
|
22
|
+
*/
|
|
23
|
+
declare const getUserProfileAction: (sessionId: string) => Promise<{
|
|
24
|
+
data: {
|
|
25
|
+
userProfile: UserProfile;
|
|
26
|
+
};
|
|
27
|
+
error: string | null;
|
|
28
|
+
success: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export default getUserProfileAction;
|
|
31
|
+
//# sourceMappingURL=getUserProfileAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserProfileAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/getUserProfileAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAG5C;;;GAGG;AACH,QAAA,MAAM,oBAAoB,GACxB,WAAW,MAAM,KAChB,OAAO,CAAC;IAAC,IAAI,EAAE;QAAC,WAAW,EAAE,WAAW,CAAA;KAAC,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAkBpF,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -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
|
+
* Server action to handle OAuth callback with authorization code.
|
|
20
|
+
* This action processes the authorization code received from the OAuth provider
|
|
21
|
+
* and exchanges it for tokens to complete the authentication flow.
|
|
22
|
+
*
|
|
23
|
+
* @param code - Authorization code from OAuth provider
|
|
24
|
+
* @param state - State parameter from OAuth provider for CSRF protection
|
|
25
|
+
* @param sessionState - Session state parameter from OAuth provider
|
|
26
|
+
* @returns Promise that resolves with success status and optional error message
|
|
27
|
+
*/
|
|
28
|
+
declare const handleOAuthCallbackAction: (code: string, state: string, sessionState?: string) => Promise<{
|
|
29
|
+
error?: string;
|
|
30
|
+
redirectUrl?: string;
|
|
31
|
+
success: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
export default handleOAuthCallbackAction;
|
|
34
|
+
//# sourceMappingURL=handleOAuthCallbackAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleOAuthCallbackAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/handleOAuthCallbackAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAaH;;;;;;;;;GASG;AACH,QAAA,MAAM,yBAAyB,GAC7B,MAAM,MAAM,EACZ,OAAO,MAAM,EACb,eAAe,MAAM,KACpB,OAAO,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB,CA+GA,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* Check if the user is currently signed in.
|
|
20
|
+
*
|
|
21
|
+
* For JWT-based sessions: the session JWT exp claim is now tied to the access
|
|
22
|
+
* token expiry. A successful jwtVerify (inside getSessionPayload) already proves
|
|
23
|
+
* exp > now, so no separate timestamp comparison is needed here.
|
|
24
|
+
*
|
|
25
|
+
* Falls back to the legacy SDK in-memory check when no JWT session cookie exists.
|
|
26
|
+
*
|
|
27
|
+
* @param sessionId - Optional session ID (used only for the legacy fallback path)
|
|
28
|
+
* @returns True if the user is signed in with a valid, non-expired token
|
|
29
|
+
*/
|
|
30
|
+
declare const isSignedIn: (sessionId?: string) => Promise<boolean>;
|
|
31
|
+
export default isSignedIn;
|
|
32
|
+
//# sourceMappingURL=isSignedIn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSignedIn.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/isSignedIn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,UAAU,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,OAAO,CA0B7D,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
* Client-safe result of a token refresh.
|
|
20
|
+
*
|
|
21
|
+
* Intentionally omits accessToken, refreshToken, idToken, and scopes — those stay
|
|
22
|
+
* server-side in the HttpOnly session cookie. Returning tokens from a Server Action
|
|
23
|
+
* serializes them into browser memory, defeating the HttpOnly boundary and exposing
|
|
24
|
+
* them to XSS, browser extensions, and error-tracking SDKs.
|
|
25
|
+
*
|
|
26
|
+
* `expiresAt` is epoch seconds for the new access token; the client uses it to
|
|
27
|
+
* schedule the next refresh.
|
|
28
|
+
*/
|
|
29
|
+
export interface RefreshResult {
|
|
30
|
+
expiresAt: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Server action to refresh the access token using the stored refresh token.
|
|
34
|
+
* Exchanges the refresh token for a new token set and updates the session cookie.
|
|
35
|
+
*
|
|
36
|
+
* Delegates the HTTP exchange to handleRefreshToken so the same logic is shared
|
|
37
|
+
* with the middleware token refresh path.
|
|
38
|
+
*
|
|
39
|
+
* Called from the client side (e.g. ThunderIDClientProvider refreshOnMount) where
|
|
40
|
+
* Next.js allows cookie mutation. When invoked during SSR rendering the cookie
|
|
41
|
+
* write is silently skipped and a warning is logged.
|
|
42
|
+
*/
|
|
43
|
+
declare const refreshToken: () => Promise<RefreshResult>;
|
|
44
|
+
export default refreshToken;
|
|
45
|
+
//# sourceMappingURL=refreshToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/refreshToken.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAaH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,QAAA,MAAM,YAAY,QAAa,OAAO,CAAC,aAAa,CAmEnD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { EmbeddedSignInFlowHandleRequestPayload, EmbeddedFlowExecuteRequestConfig, EmbeddedSignInFlowInitiateResponse } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action for signing in a user.
|
|
21
|
+
* Handles the embedded sign-in flow and manages session cookies.
|
|
22
|
+
*
|
|
23
|
+
* @param payload - The embedded sign-in flow payload
|
|
24
|
+
* @param request - The embedded flow execute request config
|
|
25
|
+
* @returns Promise that resolves when sign-in is complete
|
|
26
|
+
*/
|
|
27
|
+
declare const signInAction: (payload?: EmbeddedSignInFlowHandleRequestPayload, request?: EmbeddedFlowExecuteRequestConfig) => Promise<{
|
|
28
|
+
data?: {
|
|
29
|
+
afterSignInUrl?: string;
|
|
30
|
+
signInUrl?: string;
|
|
31
|
+
} | EmbeddedSignInFlowInitiateResponse;
|
|
32
|
+
error?: string;
|
|
33
|
+
success: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
export default signInAction;
|
|
36
|
+
//# sourceMappingURL=signInAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signInAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/signInAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAGL,sCAAsC,EACtC,gCAAgC,EAChC,kCAAkC,EAGnC,MAAM,iBAAiB,CAAC;AASzB;;;;;;;GAOG;AACH,QAAA,MAAM,YAAY,GAChB,UAAU,sCAAsC,EAChD,UAAU,gCAAgC,KACzC,OAAO,CAAC;IACT,IAAI,CAAC,EACD;QACE,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACD,kCAAkC,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAiHA,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* Server action for signing out a user.
|
|
20
|
+
* Clears both JWT and legacy session cookies.
|
|
21
|
+
*
|
|
22
|
+
* @returns Promise that resolves with success status and optional after sign-out URL
|
|
23
|
+
*/
|
|
24
|
+
declare const signOutAction: () => Promise<{
|
|
25
|
+
data?: {
|
|
26
|
+
afterSignOutUrl?: string;
|
|
27
|
+
};
|
|
28
|
+
error?: unknown;
|
|
29
|
+
success: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
export default signOutAction;
|
|
32
|
+
//# sourceMappingURL=signOutAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signOutAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/signOutAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH;;;;;GAKG;AACH,QAAA,MAAM,aAAa,QAAa,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CA8C7G,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { EmbeddedFlowExecuteRequestPayload, EmbeddedFlowExecuteResponse } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action for signing in a user.
|
|
21
|
+
* Handles the embedded sign-in flow and manages session cookies.
|
|
22
|
+
*
|
|
23
|
+
* @param payload - The embedded sign-in flow payload
|
|
24
|
+
* @param request - The embedded flow execute request config
|
|
25
|
+
* @returns Promise that resolves when sign-in is complete
|
|
26
|
+
*/
|
|
27
|
+
declare const signUpAction: (payload?: EmbeddedFlowExecuteRequestPayload) => Promise<{
|
|
28
|
+
data?: {
|
|
29
|
+
afterSignUpUrl?: string;
|
|
30
|
+
signUpUrl?: string;
|
|
31
|
+
} | EmbeddedFlowExecuteResponse;
|
|
32
|
+
error?: string;
|
|
33
|
+
success: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
export default signUpAction;
|
|
36
|
+
//# sourceMappingURL=signUpAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signUpAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/signUpAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,iCAAiC,EAAE,2BAA2B,EAAqB,MAAM,iBAAiB,CAAC;AAGnH;;;;;;;GAOG;AACH,QAAA,MAAM,YAAY,GAChB,UAAU,iCAAiC,KAC1C,OAAO,CAAC;IACT,IAAI,CAAC,EACD;QACE,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACD,2BAA2B,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAuBA,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 { Organization, TokenResponse } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to switch organization.
|
|
21
|
+
*/
|
|
22
|
+
declare const switchOrganization: (organization: Organization, sessionId: string | undefined) => Promise<TokenResponse | Response>;
|
|
23
|
+
export default switchOrganization;
|
|
24
|
+
//# sourceMappingURL=switchOrganization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switchOrganization.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/switchOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,YAAY,EAA8B,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAUxF;;GAEG;AACH,QAAA,MAAM,kBAAkB,GACtB,cAAc,YAAY,EAC1B,WAAW,MAAM,GAAG,SAAS,KAC5B,OAAO,CAAC,aAAa,GAAG,QAAQ,CAiDlC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -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 { UpdateMeProfileConfig, User } from '@thunderid/node';
|
|
19
|
+
/**
|
|
20
|
+
* Server action to get the current user.
|
|
21
|
+
* Returns the user profile if signed in.
|
|
22
|
+
*/
|
|
23
|
+
declare const updateUserProfileAction: (payload: UpdateMeProfileConfig, sessionId?: string) => Promise<{
|
|
24
|
+
data: {
|
|
25
|
+
user: User;
|
|
26
|
+
};
|
|
27
|
+
error: string;
|
|
28
|
+
success: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
export default updateUserProfileAction;
|
|
31
|
+
//# sourceMappingURL=updateUserProfileAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateUserProfileAction.d.ts","sourceRoot":"","sources":["../../../../src/server/actions/updateUserProfileAction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,qBAAqB,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAG5D;;;GAGG;AACH,QAAA,MAAM,uBAAuB,GAC3B,SAAS,qBAAqB,EAC9B,YAAY,MAAM,KACjB,OAAO,CAAC;IAAC,IAAI,EAAE;QAAC,IAAI,EAAE,IAAI,CAAA;KAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAc/D,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
|
+
export { default as thunderid } from './thunderid';
|
|
19
|
+
export { default as ThunderIDProvider } from './ThunderIDProvider.js';
|
|
20
|
+
export * from './ThunderIDProvider.js';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACpE,cAAc,wBAAwB,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
|
+
import { NextRequest } from 'next/server';
|
|
19
|
+
/**
|
|
20
|
+
* Creates a route matcher function that tests if a request matches any of the given patterns.
|
|
21
|
+
*
|
|
22
|
+
* @param patterns - Array of route patterns to match. Supports glob-like patterns.
|
|
23
|
+
* @returns Function that tests if a request matches any of the patterns
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const isProtectedRoute = createRouteMatcher([
|
|
28
|
+
* '/dashboard(.*)',
|
|
29
|
+
* '/admin(.*)',
|
|
30
|
+
* '/profile'
|
|
31
|
+
* ]);
|
|
32
|
+
*
|
|
33
|
+
* if (isProtectedRoute(req)) {
|
|
34
|
+
* // Route is protected
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare const createRouteMatcher: (patterns: string[]) => ((req: NextRequest) => boolean);
|
|
39
|
+
export default createRouteMatcher;
|
|
40
|
+
//# sourceMappingURL=createRouteMatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRouteMatcher.d.ts","sourceRoot":"","sources":["../../../../src/server/middleware/createRouteMatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,kBAAkB,GAAI,UAAU,MAAM,EAAE,KAAG,CAAC,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAe9E,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|