hazo_auth 10.26.2 → 10.31.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/cli-src/lib/auth/auth_cache.ts +11 -1
- package/cli-src/lib/auth/auth_types.ts +6 -0
- package/cli-src/lib/auth/hazo_get_auth.server.ts +66 -8
- package/cli-src/lib/auth/hazo_get_tenant_auth.server.ts +9 -45
- package/cli-src/lib/auth/scope_header.ts +58 -0
- package/cli-src/lib/email_verification_config.server.ts +3 -0
- package/cli-src/lib/forgot_password_config.server.ts +3 -0
- package/cli-src/lib/register_config.server.ts +3 -0
- package/cli-src/lib/reset_password_config.server.ts +3 -0
- package/cli-src/lib/schema/sqlite_schema.ts +150 -38
- package/cli-src/lib/services/index.ts +1 -0
- package/cli-src/lib/services/registration_service.ts +29 -4
- package/cli-src/lib/services/scope_membership_service.ts +68 -0
- package/cli-src/lib/services/scope_service.ts +21 -0
- package/cli-src/lib/services/user_scope_service.ts +4 -32
- package/dist/components/layouts/email_verification/index.d.ts +3 -1
- package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/index.js +4 -4
- package/dist/components/layouts/forgot_password/index.d.ts +3 -1
- package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/index.js +2 -2
- package/dist/components/layouts/register/hooks/use_register_form.d.ts +6 -1
- package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +4 -3
- package/dist/components/layouts/register/index.d.ts +7 -1
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/register/index.js +3 -2
- package/dist/components/layouts/reset_password/index.d.ts +3 -1
- package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/index.js +5 -5
- package/dist/lib/auth/auth_cache.d.ts +6 -2
- package/dist/lib/auth/auth_cache.d.ts.map +1 -1
- package/dist/lib/auth/auth_cache.js +6 -2
- package/dist/lib/auth/auth_types.d.ts +1 -0
- package/dist/lib/auth/auth_types.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_auth.server.js +61 -8
- package/dist/lib/auth/hazo_get_tenant_auth.server.d.ts +2 -18
- package/dist/lib/auth/hazo_get_tenant_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_tenant_auth.server.js +5 -38
- package/dist/lib/auth/scope_header.d.ts +28 -0
- package/dist/lib/auth/scope_header.d.ts.map +1 -0
- package/dist/lib/auth/scope_header.js +34 -0
- package/dist/lib/email_verification_config.server.d.ts +2 -0
- package/dist/lib/email_verification_config.server.d.ts.map +1 -1
- package/dist/lib/email_verification_config.server.js +1 -0
- package/dist/lib/forgot_password_config.server.d.ts +2 -0
- package/dist/lib/forgot_password_config.server.d.ts.map +1 -1
- package/dist/lib/forgot_password_config.server.js +1 -0
- package/dist/lib/register_config.server.d.ts +2 -0
- package/dist/lib/register_config.server.d.ts.map +1 -1
- package/dist/lib/register_config.server.js +1 -0
- package/dist/lib/reset_password_config.server.d.ts +2 -0
- package/dist/lib/reset_password_config.server.d.ts.map +1 -1
- package/dist/lib/reset_password_config.server.js +1 -0
- package/dist/lib/schema/sqlite_schema.d.ts +1 -1
- package/dist/lib/schema/sqlite_schema.d.ts.map +1 -1
- package/dist/lib/schema/sqlite_schema.js +150 -38
- package/dist/lib/services/index.d.ts +1 -0
- package/dist/lib/services/index.d.ts.map +1 -1
- package/dist/lib/services/index.js +1 -0
- package/dist/lib/services/registration_service.d.ts +11 -0
- package/dist/lib/services/registration_service.d.ts.map +1 -1
- package/dist/lib/services/registration_service.js +19 -5
- package/dist/lib/services/scope_membership_service.d.ts +20 -0
- package/dist/lib/services/scope_membership_service.d.ts.map +1 -0
- package/dist/lib/services/scope_membership_service.js +49 -0
- package/dist/lib/services/scope_service.d.ts +6 -0
- package/dist/lib/services/scope_service.d.ts.map +1 -1
- package/dist/lib/services/scope_service.js +12 -0
- package/dist/lib/services/user_scope_service.d.ts.map +1 -1
- package/dist/lib/services/user_scope_service.js +4 -30
- package/dist/server/routes/register.d.ts.map +1 -1
- package/dist/server/routes/register.js +7 -2
- package/dist/server/routes/user_management_users.d.ts +1 -1
- package/dist/server_pages/forgot_password.d.ts.map +1 -1
- package/dist/server_pages/forgot_password.js +1 -1
- package/dist/server_pages/forgot_password_client_wrapper.d.ts +1 -1
- package/dist/server_pages/forgot_password_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/forgot_password_client_wrapper.js +2 -2
- package/dist/server_pages/register.d.ts +19 -1
- package/dist/server_pages/register.d.ts.map +1 -1
- package/dist/server_pages/register.js +4 -4
- package/dist/server_pages/register_client_wrapper.d.ts +3 -1
- package/dist/server_pages/register_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/register_client_wrapper.js +2 -2
- package/dist/server_pages/reset_password.d.ts.map +1 -1
- package/dist/server_pages/reset_password.js +1 -1
- package/dist/server_pages/reset_password_client_wrapper.d.ts +1 -1
- package/dist/server_pages/reset_password_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/reset_password_client_wrapper.js +2 -2
- package/dist/server_pages/verify_email.d.ts.map +1 -1
- package/dist/server_pages/verify_email.js +1 -1
- package/dist/server_pages/verify_email_client_wrapper.d.ts +1 -1
- package/dist/server_pages/verify_email_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/verify_email_client_wrapper.js +2 -2
- package/package.json +13 -12
|
@@ -18,7 +18,7 @@ const ORDERED_FIELDS = [
|
|
|
18
18
|
FORGOT_PASSWORD_FIELD_IDS.EMAIL,
|
|
19
19
|
];
|
|
20
20
|
// section: component
|
|
21
|
-
export default function forgot_password_layout({ image_src, image_alt, image_background_color = "#f1f5f9", field_overrides, labels, button_colors, data_client, sign_in_path = "/hazo_auth/login", sign_in_label, alreadyLoggedInMessage, showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel, returnHomePath = "/", googleOnlyAccountHeading, googleOnlyAccountMessage, googleOnlyAccountHelpText, mySettingsPath = "/hazo_auth/my_settings", mySettingsLabel, }) {
|
|
21
|
+
export default function forgot_password_layout({ image_src, image_alt, image_background_color = "#f1f5f9", field_overrides, labels, button_colors, data_client, sign_in_path = "/hazo_auth/login", sign_in_label, alreadyLoggedInMessage, showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel, returnHomePath = "/", alreadyLoggedInRedirectPath, googleOnlyAccountHeading, googleOnlyAccountMessage, googleOnlyAccountHelpText, mySettingsPath = "/hazo_auth/my_settings", mySettingsLabel, }) {
|
|
22
22
|
const t = useAuthT();
|
|
23
23
|
const resolvedSignInLabel = sign_in_label !== null && sign_in_label !== void 0 ? sign_in_label : t("shared.sign_in_default");
|
|
24
24
|
const resolvedAlreadyLoggedInMessage = alreadyLoggedInMessage !== null && alreadyLoggedInMessage !== void 0 ? alreadyLoggedInMessage : t("shared.guard.already_logged_in_prop_default");
|
|
@@ -50,7 +50,7 @@ export default function forgot_password_layout({ image_src, image_alt, image_bac
|
|
|
50
50
|
return (_jsx(FormFieldWrapper, { fieldId: fieldDefinition.id, label: fieldDefinition.label, input: inputElement, errorMessage: shouldShowError }, fieldId));
|
|
51
51
|
});
|
|
52
52
|
};
|
|
53
|
-
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: resolvedAlreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsx(_Fragment, { children: form.isGoogleOnlyAccount ? (
|
|
53
|
+
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: resolvedAlreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, redirectPath: alreadyLoggedInRedirectPath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsx(_Fragment, { children: form.isGoogleOnlyAccount ? (
|
|
54
54
|
/* Google-only account message */
|
|
55
55
|
_jsxs("div", { className: "cls_forgot_password_google_only flex flex-col gap-5", children: [_jsx(FormHeader, { heading: resolvedGoogleOnlyAccountHeading, subHeading: resolvedGoogleOnlyAccountMessage }), _jsx("p", { className: "cls_forgot_password_google_only_help text-sm text-slate-600", children: resolvedGoogleOnlyAccountHelpText }), _jsxs("div", { className: "cls_forgot_password_google_only_actions flex flex-col gap-3", children: [_jsx(GoogleSignInButton, { label: t("forgot_password.google_only.sign_in_google") }), _jsx(Link, { href: mySettingsPath, className: "cls_forgot_password_settings_link text-center text-sm font-medium text-slate-700 hover:text-slate-900 hover:underline", children: resolvedMySettingsLabel })] }), _jsx("div", { className: "cls_forgot_password_sign_in_link mt-2 text-center text-sm text-slate-600", children: _jsx(Link, { href: sign_in_path, className: "font-medium text-slate-900 hover:underline", children: t("forgot_password.back_to", { sign_in_label: resolvedSignInLabel }) }) })] })) : (
|
|
56
56
|
/* Normal forgot password form */
|
|
@@ -23,6 +23,11 @@ export type UseRegisterFormParams<TClient = unknown> = {
|
|
|
23
23
|
* registration time — nested `object` properties are edited later via User
|
|
24
24
|
* Management's schema editor, not at signup. */
|
|
25
25
|
customFieldsSchema?: AppUserDataSchema | null;
|
|
26
|
+
/** A `user_type` to send with every submission from this form instance, fixed by
|
|
27
|
+
* the consumer (e.g. a `/register/parent` vs `/register/teacher` entry point) —
|
|
28
|
+
* never rendered as a field, never user-editable. Omitted = unchanged existing
|
|
29
|
+
* behavior (no `user_type` sent, same as before this option existed). */
|
|
30
|
+
fixedUserType?: string;
|
|
26
31
|
};
|
|
27
32
|
export type LocationFieldKey = "country" | "state_province" | "suburb";
|
|
28
33
|
export type UseRegisterFormResult = {
|
|
@@ -44,5 +49,5 @@ export type UseRegisterFormResult = {
|
|
|
44
49
|
customFieldValues: Record<string, string>;
|
|
45
50
|
handleCustomFieldChange: (key: string, value: string) => void;
|
|
46
51
|
};
|
|
47
|
-
export declare const use_register_form: <TClient>({ showNameField, passwordRequirements, dataClient, urlOnLogon, legalDocs, locationFields, customFieldsSchema, }: UseRegisterFormParams<TClient>) => UseRegisterFormResult;
|
|
52
|
+
export declare const use_register_form: <TClient>({ showNameField, passwordRequirements, dataClient, urlOnLogon, legalDocs, locationFields, customFieldsSchema, fixedUserType, }: UseRegisterFormParams<TClient>) => UseRegisterFormResult;
|
|
48
53
|
//# sourceMappingURL=use_register_form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_register_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/register/hooks/use_register_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACzH,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAG3F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AASrF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,GAAG;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,CAAC,eAAe,EAAE,UAAU,GAAG,kBAAkB,CAAC,EACzD,OAAO,CACR,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,OAAO,GAAG,OAAO,IAAI;IACrD,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE,0BAA0B,CAAC;IACjD,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iFAAiF;IACjF,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC;;;qDAGiD;IACjD,kBAAkB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use_register_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/register/hooks/use_register_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,KAAK,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACzH,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAG3F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAGvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AASrF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,GAAG;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,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AAC,CAAC;IACxC,yBAAyB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,cAAc,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACjD,yBAAyB,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,uBAAuB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/D,CAAC;AAYF,eAAO,MAAM,iBAAiB,GAAI,OAAO,EAAG,gIASzC,qBAAqB,CAAC,OAAO,CAAC,KAAG,qBAqVnC,CAAC"}
|
|
@@ -18,7 +18,7 @@ const buildInitialValues = () => ({
|
|
|
18
18
|
[REGISTER_FIELD_IDS.CONFIRM_PASSWORD]: "",
|
|
19
19
|
});
|
|
20
20
|
// section: hook
|
|
21
|
-
export const use_register_form = ({ showNameField, passwordRequirements, dataClient, urlOnLogon, legalDocs, locationFields, customFieldsSchema, }) => {
|
|
21
|
+
export const use_register_form = ({ showNameField, passwordRequirements, dataClient, urlOnLogon, legalDocs, locationFields, customFieldsSchema, fixedUserType, }) => {
|
|
22
22
|
const { apiBasePath } = useHazoAuthConfig();
|
|
23
23
|
const t = useAuthT();
|
|
24
24
|
const initialValues = useMemo(() => buildInitialValues(), []);
|
|
@@ -209,9 +209,9 @@ export const use_register_form = ({ showNameField, passwordRequirements, dataCli
|
|
|
209
209
|
headers: {
|
|
210
210
|
"Content-Type": "application/json",
|
|
211
211
|
},
|
|
212
|
-
body: JSON.stringify(Object.assign(Object.assign(Object.assign({ name: values[REGISTER_FIELD_IDS.NAME] || undefined, email: values[REGISTER_FIELD_IDS.EMAIL], password: values[REGISTER_FIELD_IDS.PASSWORD], url_on_logon: urlOnLogon }, (legal_accepted_payload && Object.keys(legal_accepted_payload).length > 0
|
|
212
|
+
body: JSON.stringify(Object.assign(Object.assign(Object.assign(Object.assign({ name: values[REGISTER_FIELD_IDS.NAME] || undefined, email: values[REGISTER_FIELD_IDS.EMAIL], password: values[REGISTER_FIELD_IDS.PASSWORD], url_on_logon: urlOnLogon }, (legal_accepted_payload && Object.keys(legal_accepted_payload).length > 0
|
|
213
213
|
? { legal_accepted: legal_accepted_payload }
|
|
214
|
-
: {})), (Object.keys(location_payload).length > 0 ? { location: location_payload } : {})), (Object.keys(custom_fields_payload).length > 0 ? { custom_fields: custom_fields_payload } : {}))),
|
|
214
|
+
: {})), (Object.keys(location_payload).length > 0 ? { location: location_payload } : {})), (Object.keys(custom_fields_payload).length > 0 ? { custom_fields: custom_fields_payload } : {})), (fixedUserType ? { user_type: fixedUserType } : {}))),
|
|
215
215
|
});
|
|
216
216
|
const data = await response.json();
|
|
217
217
|
if (!response.ok) {
|
|
@@ -259,6 +259,7 @@ export const use_register_form = ({ showNameField, passwordRequirements, dataCli
|
|
|
259
259
|
locationValues,
|
|
260
260
|
customFieldsSchema,
|
|
261
261
|
customFieldValues,
|
|
262
|
+
fixedUserType,
|
|
262
263
|
]);
|
|
263
264
|
const handleCancel = useCallback(() => {
|
|
264
265
|
const resetValues = buildInitialValues();
|
|
@@ -34,6 +34,8 @@ export type RegisterLayoutProps<TClient = unknown> = {
|
|
|
34
34
|
showReturnHomeButton?: boolean;
|
|
35
35
|
returnHomeButtonLabel?: string;
|
|
36
36
|
returnHomePath?: string;
|
|
37
|
+
/** `AlreadyLoggedInGuard`'s `redirectPath` prop. Ignored in `form_only` mode. */
|
|
38
|
+
alreadyLoggedInRedirectPath?: string;
|
|
37
39
|
signInPath?: string;
|
|
38
40
|
signInLabel?: string;
|
|
39
41
|
urlOnLogon?: string;
|
|
@@ -45,6 +47,10 @@ export type RegisterLayoutProps<TClient = unknown> = {
|
|
|
45
47
|
locationFields?: LocationFieldsConfig;
|
|
46
48
|
/** Arbitrary custom fields, reusing the existing app_user_data JSON Schema config. */
|
|
47
49
|
customFieldsSchema?: AppUserDataSchema | null;
|
|
50
|
+
/** A `user_type` fixed by the consuming page (e.g. `/register/parent` vs
|
|
51
|
+
* `/register/teacher`), sent with every submission from this form instance.
|
|
52
|
+
* Never rendered as a field — see `UseRegisterFormParams.fixedUserType`. */
|
|
53
|
+
fixedUserType?: string;
|
|
48
54
|
};
|
|
49
|
-
export default function register_layout<TClient>({ image_src, image_alt, image_background_color, field_overrides, labels, button_colors, password_requirements, show_name_field, data_client, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, signInPath, signInLabel, urlOnLogon, oauth, layout, locationFields, customFieldsSchema, }: RegisterLayoutProps<TClient>): import("react").JSX.Element;
|
|
55
|
+
export default function register_layout<TClient>({ image_src, image_alt, image_background_color, field_overrides, labels, button_colors, password_requirements, show_name_field, data_client, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, alreadyLoggedInRedirectPath, signInPath, signInLabel, urlOnLogon, oauth, layout, locationFields, customFieldsSchema, fixedUserType, }: RegisterLayoutProps<TClient>): import("react").JSX.Element;
|
|
50
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/register/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAClC,MAAM,uCAAuC,CAAC;AAY/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAKlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;A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DERED_FIELDS = [
|
|
|
34
34
|
REGISTER_FIELD_IDS.CONFIRM_PASSWORD,
|
|
35
35
|
];
|
|
36
36
|
// section: component
|
|
37
|
-
export default function register_layout({ image_src, image_alt, image_background_color = "#f1f5f9", field_overrides, labels, button_colors, password_requirements, show_name_field = true, data_client, alreadyLoggedInMessage, showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel, returnHomePath = "/", signInPath = "/hazo_auth/login", signInLabel, urlOnLogon, oauth, layout = "two_column", locationFields, customFieldsSchema, }) {
|
|
37
|
+
export default function register_layout({ image_src, image_alt, image_background_color = "#f1f5f9", field_overrides, labels, button_colors, password_requirements, show_name_field = true, data_client, alreadyLoggedInMessage, showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel, returnHomePath = "/", alreadyLoggedInRedirectPath, signInPath = "/hazo_auth/login", signInLabel, urlOnLogon, oauth, layout = "two_column", locationFields, customFieldsSchema, fixedUserType, }) {
|
|
38
38
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
39
39
|
const t = useAuthT();
|
|
40
40
|
const resolvedAlreadyLoggedInMessage = alreadyLoggedInMessage !== null && alreadyLoggedInMessage !== void 0 ? alreadyLoggedInMessage : t("shared.guard.already_logged_in_prop_default");
|
|
@@ -104,6 +104,7 @@ export default function register_layout({ image_src, image_alt, image_background
|
|
|
104
104
|
legalDocs: legal_docs,
|
|
105
105
|
locationFields,
|
|
106
106
|
customFieldsSchema,
|
|
107
|
+
fixedUserType,
|
|
107
108
|
});
|
|
108
109
|
// Additive, below the fixed name/email/password fields — never merged into
|
|
109
110
|
// REGISTER_FIELD_IDS's closed union (see use_register_form.ts's doc comment).
|
|
@@ -156,7 +157,7 @@ export default function register_layout({ image_src, image_alt, image_background
|
|
|
156
157
|
if (layout === "form_only") {
|
|
157
158
|
return (_jsx("div", { className: "cls_register_layout_form_only_container mx-auto flex w-full max-w-sm flex-col gap-6", children: mainContent }));
|
|
158
159
|
}
|
|
159
|
-
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: resolvedAlreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: mainContent }) }));
|
|
160
|
+
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: resolvedAlreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, redirectPath: alreadyLoggedInRedirectPath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: mainContent }) }));
|
|
160
161
|
}
|
|
161
162
|
// Same-origin path validator. See login/index.tsx for the rationale.
|
|
162
163
|
function isSafeRedirectPath(value) {
|
|
@@ -15,10 +15,12 @@ export type ResetPasswordLayoutProps<TClient = unknown> = {
|
|
|
15
15
|
showReturnHomeButton?: boolean;
|
|
16
16
|
returnHomeButtonLabel?: string;
|
|
17
17
|
returnHomePath?: string;
|
|
18
|
+
/** `AlreadyLoggedInGuard`'s `redirectPath` prop. */
|
|
19
|
+
alreadyLoggedInRedirectPath?: string;
|
|
18
20
|
errorMessage?: string;
|
|
19
21
|
successMessage?: string;
|
|
20
22
|
loginPath?: string;
|
|
21
23
|
forgotPasswordPath?: string;
|
|
22
24
|
};
|
|
23
|
-
export default function reset_password_layout<TClient>({ image_src, image_alt, image_background_color, field_overrides, labels, button_colors, password_requirements, data_client, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, errorMessage, successMessage, loginPath, forgotPasswordPath, }: ResetPasswordLayoutProps<TClient>): import("react").JSX.Element;
|
|
25
|
+
export default function reset_password_layout<TClient>({ image_src, image_alt, image_background_color, field_overrides, labels, button_colors, password_requirements, data_client, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, alreadyLoggedInRedirectPath, errorMessage, successMessage, loginPath, forgotPasswordPath, }: ResetPasswordLayoutProps<TClient>): import("react").JSX.Element;
|
|
24
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/reset_password/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOlD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAClC,MAAM,uCAAuC,CAAC;AAY/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,MAAM,MAAM,wBAAwB,CAAC,OAAO,GAAG,OAAO,IAAI;IACxD,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,qBAAqB,CAAC,EAAE,4BAA4B,CAAC;IACrD,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAUF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,OAAO,EAAE,EACrD,SAAS,EACT,SAAS,EACT,sBAAkC,EAClC,eAAe,EACf,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,sBAAsB,EACtB,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqB,EACrB,cAAoB,EACpB,YAAY,EACZ,cAAc,EACd,SAA8B,EAC9B,kBAAiD,GAClD,EAAE,wBAAwB,CAAC,OAAO,CAAC,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/reset_password/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOlD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAClC,MAAM,uCAAuC,CAAC;AAY/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,MAAM,MAAM,wBAAwB,CAAC,OAAO,GAAG,OAAO,IAAI;IACxD,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,qBAAqB,CAAC,EAAE,4BAA4B,CAAC;IACrD,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAUF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,OAAO,EAAE,EACrD,SAAS,EACT,SAAS,EACT,sBAAkC,EAClC,eAAe,EACf,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,sBAAsB,EACtB,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqB,EACrB,cAAoB,EACpB,2BAA2B,EAC3B,YAAY,EACZ,cAAc,EACd,SAA8B,EAC9B,kBAAiD,GAClD,EAAE,wBAAwB,CAAC,OAAO,CAAC,+BA8NnC"}
|
|
@@ -19,7 +19,7 @@ const ORDERED_FIELDS = [
|
|
|
19
19
|
RESET_PASSWORD_FIELD_IDS.CONFIRM_PASSWORD,
|
|
20
20
|
];
|
|
21
21
|
// section: component
|
|
22
|
-
export default function reset_password_layout({ image_src, image_alt, image_background_color = "#f1f5f9", field_overrides, labels, button_colors, password_requirements, data_client, alreadyLoggedInMessage, showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel, returnHomePath = "/", errorMessage, successMessage, loginPath = "/hazo_auth/login", forgotPasswordPath = "/hazo_auth/forgot_password", }) {
|
|
22
|
+
export default function reset_password_layout({ image_src, image_alt, image_background_color = "#f1f5f9", field_overrides, labels, button_colors, password_requirements, data_client, alreadyLoggedInMessage, showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel, returnHomePath = "/", alreadyLoggedInRedirectPath, errorMessage, successMessage, loginPath = "/hazo_auth/login", forgotPasswordPath = "/hazo_auth/forgot_password", }) {
|
|
23
23
|
const t = useAuthT();
|
|
24
24
|
const resolvedReturnHomeButtonLabel = returnHomeButtonLabel !== null && returnHomeButtonLabel !== void 0 ? returnHomeButtonLabel : t("shared.guard.return_home_default");
|
|
25
25
|
const resolvedErrorMessage = errorMessage !== null && errorMessage !== void 0 ? errorMessage : t("reset_password.link_invalid_message");
|
|
@@ -44,15 +44,15 @@ export default function reset_password_layout({ image_src, image_alt, image_back
|
|
|
44
44
|
};
|
|
45
45
|
// Show success message if password reset was successful
|
|
46
46
|
if (form.isSuccess) {
|
|
47
|
-
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs(_Fragment, { children: [_jsx(FormHeader, { heading: resolvedLabels.heading, subHeading: resolvedLabels.subHeading }), _jsxs("div", { className: "cls_reset_password_layout_success flex flex-col items-center justify-center gap-4 p-8 text-center", children: [_jsx(CheckCircle, { className: "cls_reset_password_layout_success_icon h-16 w-16 text-green-600", "aria-hidden": "true" }), _jsx("p", { className: "cls_reset_password_layout_success_message text-lg font-medium text-slate-900", children: resolvedSuccessMessage })] })] }) }) }));
|
|
47
|
+
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, redirectPath: alreadyLoggedInRedirectPath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs(_Fragment, { children: [_jsx(FormHeader, { heading: resolvedLabels.heading, subHeading: resolvedLabels.subHeading }), _jsxs("div", { className: "cls_reset_password_layout_success flex flex-col items-center justify-center gap-4 p-8 text-center", children: [_jsx(CheckCircle, { className: "cls_reset_password_layout_success_icon h-16 w-16 text-green-600", "aria-hidden": "true" }), _jsx("p", { className: "cls_reset_password_layout_success_message text-lg font-medium text-slate-900", children: resolvedSuccessMessage })] })] }) }) }));
|
|
48
48
|
}
|
|
49
49
|
// Show loading state while validating token
|
|
50
50
|
if (form.isValidatingToken) {
|
|
51
|
-
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs("div", { className: "cls_reset_password_layout_validating flex flex-col items-center justify-center gap-4 py-8", children: [_jsx(Loader2, { className: "h-12 w-12 animate-spin text-slate-600", "aria-hidden": "true" }), _jsxs("div", { className: "cls_reset_password_layout_validating_text text-center", children: [_jsx("h1", { className: "cls_reset_password_layout_validating_heading text-2xl font-semibold text-slate-900", children: resolvedLabels.heading }), _jsx("p", { className: "cls_reset_password_layout_validating_subheading mt-2 text-sm text-slate-600", children: t("reset_password.validating_message") })] })] }) }) }));
|
|
51
|
+
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, redirectPath: alreadyLoggedInRedirectPath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs("div", { className: "cls_reset_password_layout_validating flex flex-col items-center justify-center gap-4 py-8", children: [_jsx(Loader2, { className: "h-12 w-12 animate-spin text-slate-600", "aria-hidden": "true" }), _jsxs("div", { className: "cls_reset_password_layout_validating_text text-center", children: [_jsx("h1", { className: "cls_reset_password_layout_validating_heading text-2xl font-semibold text-slate-900", children: resolvedLabels.heading }), _jsx("p", { className: "cls_reset_password_layout_validating_subheading mt-2 text-sm text-slate-600", children: t("reset_password.validating_message") })] })] }) }) }));
|
|
52
52
|
}
|
|
53
53
|
// Show error message if token is invalid or missing
|
|
54
54
|
if (form.tokenError || !form.token) {
|
|
55
|
-
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs("div", { className: "cls_reset_password_layout_error flex flex-col items-center justify-center gap-4 p-8 text-center", children: [_jsx(XCircle, { className: "cls_reset_password_layout_error_icon h-16 w-16 text-red-600", "aria-hidden": "true" }), _jsxs("div", { className: "cls_reset_password_layout_error_text", children: [_jsx("h1", { className: "cls_reset_password_layout_error_heading text-2xl font-semibold text-slate-900", children: t("reset_password.invalid_link_heading") }), _jsx("p", { className: "cls_reset_password_layout_error_message mt-2 text-sm text-slate-600", children: form.tokenError || resolvedErrorMessage })] }), _jsx(Link, { href: forgotPasswordPath, className: "cls_reset_password_layout_forgot_password_link mt-4 text-sm text-blue-600 hover:text-blue-800 underline", children: t("reset_password.invalid_link_page_link") })] }) }) }));
|
|
55
|
+
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, redirectPath: alreadyLoggedInRedirectPath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs("div", { className: "cls_reset_password_layout_error flex flex-col items-center justify-center gap-4 p-8 text-center", children: [_jsx(XCircle, { className: "cls_reset_password_layout_error_icon h-16 w-16 text-red-600", "aria-hidden": "true" }), _jsxs("div", { className: "cls_reset_password_layout_error_text", children: [_jsx("h1", { className: "cls_reset_password_layout_error_heading text-2xl font-semibold text-slate-900", children: t("reset_password.invalid_link_heading") }), _jsx("p", { className: "cls_reset_password_layout_error_message mt-2 text-sm text-slate-600", children: form.tokenError || resolvedErrorMessage })] }), _jsx(Link, { href: forgotPasswordPath, className: "cls_reset_password_layout_forgot_password_link mt-4 text-sm text-blue-600 hover:text-blue-800 underline", children: t("reset_password.invalid_link_page_link") })] }) }) }));
|
|
56
56
|
}
|
|
57
|
-
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs(_Fragment, { children: [_jsx(FormHeader, { heading: resolvedLabels.heading, subHeading: resolvedLabels.subHeading }), _jsxs("form", { className: "cls_reset_password_layout_form_fields flex flex-col gap-5", onSubmit: form.handleSubmit, "aria-label": t("reset_password.aria.form"), children: [renderFields(form), _jsx(FormActionButtons, { submitLabel: resolvedLabels.submitButton, cancelLabel: resolvedLabels.cancelButton, buttonPalette: resolvedButtonPalette, isSubmitDisabled: form.isSubmitDisabled, onCancel: form.handleCancel, submitAriaLabel: t("reset_password.aria.submit"), cancelAriaLabel: t("reset_password.aria.cancel") }), form.isSubmitting && (_jsx("div", { className: "cls_reset_password_layout_submitting_indicator text-sm text-slate-600 text-center", children: t("reset_password.submitting_indicator") }))] })] }) }) }));
|
|
57
|
+
return (_jsx(AlreadyLoggedInGuard, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: resolvedReturnHomeButtonLabel, returnHomePath: returnHomePath, redirectPath: alreadyLoggedInRedirectPath, children: _jsx(TwoColumnAuthLayout, { imageSrc: image_src, imageAlt: image_alt, imageBackgroundColor: image_background_color, formContent: _jsxs(_Fragment, { children: [_jsx(FormHeader, { heading: resolvedLabels.heading, subHeading: resolvedLabels.subHeading }), _jsxs("form", { className: "cls_reset_password_layout_form_fields flex flex-col gap-5", onSubmit: form.handleSubmit, "aria-label": t("reset_password.aria.form"), children: [renderFields(form), _jsx(FormActionButtons, { submitLabel: resolvedLabels.submitButton, cancelLabel: resolvedLabels.cancelButton, buttonPalette: resolvedButtonPalette, isSubmitDisabled: form.isSubmitDisabled, onCancel: form.handleCancel, submitAriaLabel: t("reset_password.aria.submit"), cancelAriaLabel: t("reset_password.aria.cancel") }), form.isSubmitting && (_jsx("div", { className: "cls_reset_password_layout_submitting_indicator text-sm text-slate-600 text-center", children: t("reset_password.submitting_indicator") }))] })] }) }) }));
|
|
58
58
|
}
|
|
@@ -9,6 +9,7 @@ type CacheEntry = {
|
|
|
9
9
|
permissions: string[];
|
|
10
10
|
role_ids: string[];
|
|
11
11
|
scopes: ScopeDetails[];
|
|
12
|
+
permissions_by_role: Record<string, string[]>;
|
|
12
13
|
timestamp: number;
|
|
13
14
|
cache_version: number;
|
|
14
15
|
};
|
|
@@ -35,11 +36,14 @@ declare class AuthCache {
|
|
|
35
36
|
* Evicts least recently used entries if cache is full
|
|
36
37
|
* @param user_id - User ID
|
|
37
38
|
* @param user - User data
|
|
38
|
-
* @param permissions - User permissions
|
|
39
|
+
* @param permissions - User permissions (union across all scope roles)
|
|
39
40
|
* @param role_ids - User role IDs (v5.x: string UUIDs)
|
|
40
41
|
* @param scopes - User scope details with full information (v5.2+)
|
|
42
|
+
* @param permissions_by_role - Per-role permission breakdown (v10.29+), used
|
|
43
|
+
* for HRBAC scope-aware filtering. Defaults to {} for callers that haven't
|
|
44
|
+
* been updated yet (scope-aware resolution simply won't have data to filter).
|
|
41
45
|
*/
|
|
42
|
-
set(user_id: string, user: HazoAuthUser, permissions: string[], role_ids: string[], scopes?: ScopeDetails[]): void;
|
|
46
|
+
set(user_id: string, user: HazoAuthUser, permissions: string[], role_ids: string[], scopes?: ScopeDetails[], permissions_by_role?: Record<string, string[]>): void;
|
|
43
47
|
/**
|
|
44
48
|
* Invalidates cache for a specific user
|
|
45
49
|
* @param user_id - User ID to invalidate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_cache.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/auth_cache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI/D;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"auth_cache.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/auth_cache.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI/D;;;;GAIG;AACH,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,YAAY,EAAE,CAAC;IAKvB,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;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full
|
|
46
46
|
* @param user_id - User ID
|
|
47
47
|
* @param user - User data
|
|
48
|
-
* @param permissions - User permissions
|
|
48
|
+
* @param permissions - User permissions (union across all scope roles)
|
|
49
49
|
* @param role_ids - User role IDs (v5.x: string UUIDs)
|
|
50
50
|
* @param scopes - User scope details with full information (v5.2+)
|
|
51
|
+
* @param permissions_by_role - Per-role permission breakdown (v10.29+), used
|
|
52
|
+
* for HRBAC scope-aware filtering. Defaults to {} for callers that haven't
|
|
53
|
+
* been updated yet (scope-aware resolution simply won't have data to filter).
|
|
51
54
|
*/
|
|
52
|
-
set(user_id, user, permissions, role_ids, scopes = []) {
|
|
55
|
+
set(user_id, user, permissions, role_ids, scopes = [], permissions_by_role = {}) {
|
|
53
56
|
// Evict LRU entries if cache is full
|
|
54
57
|
while (this.cache.size >= this.max_size) {
|
|
55
58
|
const first_key = this.cache.keys().next().value;
|
|
@@ -67,6 +70,7 @@ class AuthCache {
|
|
|
67
70
|
permissions,
|
|
68
71
|
role_ids,
|
|
69
72
|
scopes,
|
|
73
|
+
permissions_by_role,
|
|
70
74
|
timestamp: Date.now(),
|
|
71
75
|
cache_version,
|
|
72
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_types.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/auth_types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAA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AQ,EAAE,MAAM;aAChB,WAAW,EAAE,YAAY,EAAE;gBAD3B,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,YAAY,EAAO;CAKnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_get_auth.server.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/hazo_get_auth.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAGhB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"hazo_get_auth.server.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/hazo_get_auth.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAGhB,MAAM,cAAc,CAAC;AAiEtB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAU1D;AAwUD;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC,CAgQzB"}
|
|
@@ -17,6 +17,7 @@ import { check_user_scope_access, get_user_scopes, } from "../services/user_scop
|
|
|
17
17
|
import { get_cookie_name, BASE_COOKIE_NAMES } from "../cookies_config.server.js";
|
|
18
18
|
import { get_app_permission_descriptions } from "../app_permissions_config.server.js";
|
|
19
19
|
import { GLOBAL_ADMIN_PERMISSION } from "../constants.js";
|
|
20
|
+
import { extract_scope_id_from_request } from "./scope_header.js";
|
|
20
21
|
// section: helpers
|
|
21
22
|
/**
|
|
22
23
|
* Parse JSON string to object, returning null on failure
|
|
@@ -126,6 +127,7 @@ async function fetch_user_scope_details(user_id) {
|
|
|
126
127
|
* @returns Object with user, permissions, role_ids, and scopes
|
|
127
128
|
*/
|
|
128
129
|
async function fetch_user_data_from_db(user_id) {
|
|
130
|
+
var _a;
|
|
129
131
|
const hazoConnect = get_hazo_connect_instance();
|
|
130
132
|
const users_service = createCrudService(hazoConnect, "hazo_users");
|
|
131
133
|
// v5.x: Use hazo_user_scopes instead of hazo_user_roles
|
|
@@ -157,6 +159,7 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
157
159
|
country: user_db.country || null,
|
|
158
160
|
state_province: user_db.state_province || null,
|
|
159
161
|
suburb: user_db.suburb || null,
|
|
162
|
+
user_type: user_db.user_type || null,
|
|
160
163
|
};
|
|
161
164
|
// v5.x: Fetch user's roles from hazo_user_scopes (scope-based role assignments)
|
|
162
165
|
// Each scope assignment has a role_id (string UUID)
|
|
@@ -171,8 +174,12 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
176
|
const role_ids = Array.from(role_ids_set);
|
|
174
|
-
// Fetch role permissions
|
|
177
|
+
// Fetch role permissions. Builds both the flattened union (`permissions`,
|
|
178
|
+
// used when HRBAC is disabled or no active scope is set) and a per-role
|
|
179
|
+
// breakdown (`permissions_by_role`, used by hazo_get_auth to filter down to
|
|
180
|
+
// just the active scope's role — see "section: scope_aware_permissions" below).
|
|
175
181
|
const permissions_set = new Set();
|
|
182
|
+
const permissions_by_role = {};
|
|
176
183
|
if (role_ids.length > 0) {
|
|
177
184
|
const role_permissions = await role_permissions_service.findBy({});
|
|
178
185
|
if (Array.isArray(role_permissions)) {
|
|
@@ -186,7 +193,9 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
186
193
|
permission_ids.add(String(perm_id));
|
|
187
194
|
}
|
|
188
195
|
}
|
|
189
|
-
// Fetch permission names
|
|
196
|
+
// Fetch permission names, keyed by permission_id, so we can resolve
|
|
197
|
+
// both the flattened union and each role's own subset from one query.
|
|
198
|
+
const permission_names_by_id = new Map();
|
|
190
199
|
if (permission_ids.size > 0) {
|
|
191
200
|
const permissions = await permissions_service.findBy({});
|
|
192
201
|
if (Array.isArray(permissions)) {
|
|
@@ -195,18 +204,32 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
195
204
|
if (perm_id !== undefined && permission_ids.has(String(perm_id))) {
|
|
196
205
|
const perm_name = perm.permission_name;
|
|
197
206
|
if (perm_name) {
|
|
198
|
-
|
|
207
|
+
permission_names_by_id.set(String(perm_id), perm_name);
|
|
199
208
|
}
|
|
200
209
|
}
|
|
201
210
|
}
|
|
202
211
|
}
|
|
203
212
|
}
|
|
213
|
+
for (const role_id of role_ids) {
|
|
214
|
+
permissions_by_role[role_id] = [];
|
|
215
|
+
}
|
|
216
|
+
for (const rp of user_role_permissions) {
|
|
217
|
+
const perm_id = rp.permission_id;
|
|
218
|
+
if (perm_id === undefined)
|
|
219
|
+
continue;
|
|
220
|
+
const perm_name = permission_names_by_id.get(String(perm_id));
|
|
221
|
+
if (!perm_name)
|
|
222
|
+
continue;
|
|
223
|
+
permissions_set.add(perm_name);
|
|
224
|
+
const role_id = String(rp.role_id);
|
|
225
|
+
((_a = permissions_by_role[role_id]) !== null && _a !== void 0 ? _a : (permissions_by_role[role_id] = [])).push(perm_name);
|
|
226
|
+
}
|
|
204
227
|
}
|
|
205
228
|
}
|
|
206
229
|
const permissions = Array.from(permissions_set);
|
|
207
230
|
// v5.2: Fetch full scope details for caching
|
|
208
231
|
const scopes = await fetch_user_scope_details(user_id);
|
|
209
|
-
return { user, permissions, role_ids, scopes };
|
|
232
|
+
return { user, permissions, role_ids, scopes, permissions_by_role };
|
|
210
233
|
}
|
|
211
234
|
/**
|
|
212
235
|
* Checks if user has required permissions
|
|
@@ -310,7 +333,7 @@ async function check_scope_access_internal(user_id, scope_id) {
|
|
|
310
333
|
* @throws ScopeAccessError if strict mode and scope access is denied
|
|
311
334
|
*/
|
|
312
335
|
export async function hazo_get_auth(request, options) {
|
|
313
|
-
var _a, _b, _c;
|
|
336
|
+
var _a, _b, _c, _d, _e;
|
|
314
337
|
const logger = create_app_logger();
|
|
315
338
|
const config = get_auth_utility_config();
|
|
316
339
|
const cache = get_auth_cache(config.cache_max_users, config.cache_ttl_minutes, config.cache_max_age_minutes);
|
|
@@ -382,11 +405,15 @@ export async function hazo_get_auth(request, options) {
|
|
|
382
405
|
let user;
|
|
383
406
|
let permissions;
|
|
384
407
|
let role_ids; // v5.x: role_ids are now string UUIDs
|
|
408
|
+
let scopes;
|
|
409
|
+
let permissions_by_role;
|
|
385
410
|
if (cached_entry) {
|
|
386
411
|
// Cache hit
|
|
387
412
|
user = cached_entry.user;
|
|
388
413
|
permissions = cached_entry.permissions;
|
|
389
414
|
role_ids = cached_entry.role_ids;
|
|
415
|
+
scopes = cached_entry.scopes;
|
|
416
|
+
permissions_by_role = cached_entry.permissions_by_role;
|
|
390
417
|
}
|
|
391
418
|
else {
|
|
392
419
|
// Cache miss - fetch from database
|
|
@@ -395,8 +422,10 @@ export async function hazo_get_auth(request, options) {
|
|
|
395
422
|
user = user_data.user;
|
|
396
423
|
permissions = user_data.permissions;
|
|
397
424
|
role_ids = user_data.role_ids;
|
|
398
|
-
|
|
399
|
-
|
|
425
|
+
scopes = user_data.scopes;
|
|
426
|
+
permissions_by_role = user_data.permissions_by_role;
|
|
427
|
+
// Update cache (v5.2: includes scope details for tenant auth; v10.29: per-role breakdown)
|
|
428
|
+
cache.set(user_id, user, permissions, role_ids, scopes, permissions_by_role);
|
|
400
429
|
}
|
|
401
430
|
catch (error) {
|
|
402
431
|
const error_message = error instanceof Error ? error.message : "Unknown error";
|
|
@@ -415,6 +444,31 @@ export async function hazo_get_auth(request, options) {
|
|
|
415
444
|
};
|
|
416
445
|
}
|
|
417
446
|
}
|
|
447
|
+
// section: scope_aware_permissions (ticket 12 — HRBAC scope-aware permissions)
|
|
448
|
+
//
|
|
449
|
+
// `permissions` above is the union across every scope the user belongs to — the
|
|
450
|
+
// pre-existing behavior, which this block preserves as the fallback whenever:
|
|
451
|
+
// - HRBAC is disabled, or
|
|
452
|
+
// - no active scope is set (no X-Hazo-Scope-Id header/cookie, and the caller
|
|
453
|
+
// didn't pass options.scope_id), or
|
|
454
|
+
// - the user holds the global-admin permission, which transcends scope by
|
|
455
|
+
// design (identical bypass to the scope-ACCESS check further below).
|
|
456
|
+
//
|
|
457
|
+
// Otherwise, permissions are narrowed to ONLY the role assigned in the active
|
|
458
|
+
// scope — fixing the gap where a role in scope A incorrectly granted its
|
|
459
|
+
// permissions while the user was operating in unrelated scope B. A user with no
|
|
460
|
+
// hazo_user_scopes row for the active scope gets zero permissions there (not the
|
|
461
|
+
// union) — they are simply not a member of that scope.
|
|
462
|
+
const hrbac_enabled = is_hrbac_enabled();
|
|
463
|
+
const active_scope_id = (_d = options === null || options === void 0 ? void 0 : options.scope_id) !== null && _d !== void 0 ? _d : extract_scope_id_from_request(request);
|
|
464
|
+
if (hrbac_enabled &&
|
|
465
|
+
active_scope_id &&
|
|
466
|
+
!permissions.includes(GLOBAL_ADMIN_PERMISSION)) {
|
|
467
|
+
const active_scope = scopes.find((s) => s.id === active_scope_id);
|
|
468
|
+
permissions = active_scope
|
|
469
|
+
? (_e = permissions_by_role[active_scope.role_id]) !== null && _e !== void 0 ? _e : []
|
|
470
|
+
: [];
|
|
471
|
+
}
|
|
418
472
|
// Check permissions if required
|
|
419
473
|
let permission_ok = true;
|
|
420
474
|
let missing_permissions;
|
|
@@ -447,7 +501,6 @@ export async function hazo_get_auth(request, options) {
|
|
|
447
501
|
// Check scope access if enabled and scope_id provided
|
|
448
502
|
let scope_ok;
|
|
449
503
|
let scope_access_via;
|
|
450
|
-
const hrbac_enabled = is_hrbac_enabled();
|
|
451
504
|
if (hrbac_enabled && (options === null || options === void 0 ? void 0 : options.scope_id)) {
|
|
452
505
|
// Global admin permission grants access to all scopes
|
|
453
506
|
const has_global_admin = permissions.includes(GLOBAL_ADMIN_PERMISSION);
|
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
import "server-only";
|
|
2
2
|
import { NextRequest } from "next/server";
|
|
3
|
+
import { extract_scope_id_from_request, SCOPE_COOKIE_BASE_NAME, get_scope_cookie_name } from "./scope_header.js";
|
|
3
4
|
import type { TenantAuthOptions, TenantAuthResult, RequiredTenantAuthResult } from "./auth_types";
|
|
4
|
-
|
|
5
|
-
* Base cookie name for scope ID (will have prefix applied).
|
|
6
|
-
*
|
|
7
|
-
* Exported so a consuming app can SET the same cookie this module READS —
|
|
8
|
-
* without it, an app implementing a scope switcher has to duplicate the
|
|
9
|
-
* configured prefix and drift the moment it changes.
|
|
10
|
-
*/
|
|
11
|
-
export declare const SCOPE_COOKIE_BASE_NAME = "hazo_auth_scope_id";
|
|
12
|
-
/** The live, prefixed scope cookie name for this deployment. */
|
|
13
|
-
export declare function get_scope_cookie_name(): string;
|
|
14
|
-
/**
|
|
15
|
-
* Extracts scope ID from request headers or cookies
|
|
16
|
-
* Priority: Header > Cookie
|
|
17
|
-
* @param request - NextRequest object
|
|
18
|
-
* @param options - TenantAuthOptions for customization
|
|
19
|
-
* @returns Scope ID if found, undefined otherwise
|
|
20
|
-
*/
|
|
21
|
-
export declare function extract_scope_id_from_request(request: NextRequest, options: TenantAuthOptions): string | undefined;
|
|
5
|
+
export { extract_scope_id_from_request, SCOPE_COOKIE_BASE_NAME, get_scope_cookie_name };
|
|
22
6
|
/**
|
|
23
7
|
* Tenant-aware authentication function
|
|
24
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_get_tenant_auth.server.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/hazo_get_tenant_auth.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"hazo_get_tenant_auth.server.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/hazo_get_tenant_auth.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO1C,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EAGzB,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;AAgCxF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CAwF3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,wBAAwB,CAAC,CA0BnC"}
|
|
@@ -6,47 +6,14 @@ import { get_auth_cache } from "./auth_cache.js";
|
|
|
6
6
|
import { get_scope_by_id } from "../services/scope_service.js";
|
|
7
7
|
import { GLOBAL_ADMIN_PERMISSION } from "../constants.js";
|
|
8
8
|
import { get_hazo_connect_instance } from "../hazo_connect_instance.server.js";
|
|
9
|
-
import { get_cookie_name } from "../cookies_config.server.js";
|
|
10
9
|
import { get_auth_utility_config } from "../auth_utility_config.server.js";
|
|
10
|
+
import { extract_scope_id_from_request, SCOPE_COOKIE_BASE_NAME, get_scope_cookie_name, } from "./scope_header.js";
|
|
11
11
|
import { AuthenticationRequiredError, TenantRequiredError, TenantAccessDeniedError, } from "./auth_types.js";
|
|
12
|
-
// section:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const DEFAULT_SCOPE_HEADER = "X-Hazo-Scope-Id";
|
|
17
|
-
/**
|
|
18
|
-
* Base cookie name for scope ID (will have prefix applied).
|
|
19
|
-
*
|
|
20
|
-
* Exported so a consuming app can SET the same cookie this module READS —
|
|
21
|
-
* without it, an app implementing a scope switcher has to duplicate the
|
|
22
|
-
* configured prefix and drift the moment it changes.
|
|
23
|
-
*/
|
|
24
|
-
export const SCOPE_COOKIE_BASE_NAME = "hazo_auth_scope_id";
|
|
25
|
-
/** The live, prefixed scope cookie name for this deployment. */
|
|
26
|
-
export function get_scope_cookie_name() {
|
|
27
|
-
return get_cookie_name(SCOPE_COOKIE_BASE_NAME);
|
|
28
|
-
}
|
|
12
|
+
// section: re_exports
|
|
13
|
+
// Moved to scope_header.ts (shared with hazo_get_auth's scope-aware permission
|
|
14
|
+
// resolution) — re-exported here so existing consumers of this module keep working.
|
|
15
|
+
export { extract_scope_id_from_request, SCOPE_COOKIE_BASE_NAME, get_scope_cookie_name };
|
|
29
16
|
// section: helpers
|
|
30
|
-
/**
|
|
31
|
-
* Extracts scope ID from request headers or cookies
|
|
32
|
-
* Priority: Header > Cookie
|
|
33
|
-
* @param request - NextRequest object
|
|
34
|
-
* @param options - TenantAuthOptions for customization
|
|
35
|
-
* @returns Scope ID if found, undefined otherwise
|
|
36
|
-
*/
|
|
37
|
-
export function extract_scope_id_from_request(request, options) {
|
|
38
|
-
var _a;
|
|
39
|
-
// Check header first
|
|
40
|
-
const header_name = options.scope_header_name || DEFAULT_SCOPE_HEADER;
|
|
41
|
-
const header_value = request.headers.get(header_name);
|
|
42
|
-
if (header_value) {
|
|
43
|
-
return header_value;
|
|
44
|
-
}
|
|
45
|
-
// Check cookie (with prefix)
|
|
46
|
-
const cookie_name = options.scope_cookie_name || get_cookie_name(SCOPE_COOKIE_BASE_NAME);
|
|
47
|
-
const cookie_value = (_a = request.cookies.get(cookie_name)) === null || _a === void 0 ? void 0 : _a.value;
|
|
48
|
-
return cookie_value;
|
|
49
|
-
}
|
|
50
17
|
/**
|
|
51
18
|
* Builds TenantOrganization from scope details
|
|
52
19
|
* @param scope_details - Full scope details from cache
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NextRequest } from "next/server";
|
|
2
|
+
/** Default header name for the active scope ID. */
|
|
3
|
+
export declare const DEFAULT_SCOPE_HEADER = "X-Hazo-Scope-Id";
|
|
4
|
+
/**
|
|
5
|
+
* Base cookie name for scope ID (will have the configured prefix applied).
|
|
6
|
+
*
|
|
7
|
+
* Exported so a consuming app can SET the same cookie this module READS — without it,
|
|
8
|
+
* an app implementing a scope switcher has to duplicate the configured prefix and drift
|
|
9
|
+
* the moment it changes.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SCOPE_COOKIE_BASE_NAME = "hazo_auth_scope_id";
|
|
12
|
+
/** The live, prefixed scope cookie name for this deployment. */
|
|
13
|
+
export declare function get_scope_cookie_name(): string;
|
|
14
|
+
export type ScopeHeaderOverrides = {
|
|
15
|
+
/** Header name to check for scope ID (default: "X-Hazo-Scope-Id") */
|
|
16
|
+
scope_header_name?: string;
|
|
17
|
+
/** Cookie name to check for scope ID (uses cookie prefix if not specified) */
|
|
18
|
+
scope_cookie_name?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Extracts the active scope ID from request headers or cookies.
|
|
22
|
+
* Priority: header > cookie.
|
|
23
|
+
* @param request - NextRequest object
|
|
24
|
+
* @param overrides - optional header/cookie name overrides
|
|
25
|
+
* @returns Scope ID if found, undefined otherwise
|
|
26
|
+
*/
|
|
27
|
+
export declare function extract_scope_id_from_request(request: NextRequest, overrides?: ScopeHeaderOverrides): string | undefined;
|
|
28
|
+
//# sourceMappingURL=scope_header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope_header.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/scope_header.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D,gEAAgE;AAChE,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAID,MAAM,MAAM,oBAAoB,GAAG;IACjC,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAIF;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,WAAW,EACpB,SAAS,GAAE,oBAAyB,GACnC,MAAM,GAAG,SAAS,CASpB"}
|