@adonis-agora/authkit-server 0.61.3 → 0.61.4
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/build/commands/settings_get.js +1 -1
- package/build/commands/settings_set.js +1 -1
- package/build/commands/settings_unset.js +1 -1
- package/build/index.d.ts +99 -118
- package/build/index.js +75 -84
- package/build/src/accounts/lucid_store/core.js +1 -1
- package/build/src/accounts/lucid_store/mfa.d.ts +0 -12
- package/build/src/accounts/lucid_store/mfa.js +16 -16
- package/build/src/audit/audit_sink.d.ts +1 -1
- package/build/src/commands/import_users.js +3 -1
- package/build/src/define_config.d.ts +2 -2
- package/build/src/host/account_api/account_api_controller.js +1 -1
- package/build/src/host/account_paths.d.ts +9 -9
- package/build/src/host/admin_api/api_orgs_controller.d.ts +10 -10
- package/build/src/host/admin_api/api_settings_controller.d.ts +3 -3
- package/build/src/host/admin_api/api_settings_controller.js +1 -1
- package/build/src/host/admin_api/api_users_controller.d.ts +3 -3
- package/build/src/host/admin_api/dto.d.ts +12 -13
- package/build/src/host/admin_console/console_orgs_controller.d.ts +9 -9
- package/build/src/host/admin_console/console_roles_controller.js +1 -1
- package/build/src/host/admin_console/console_settings_controller.d.ts +2 -2
- package/build/src/host/admin_console/console_settings_controller.js +1 -1
- package/build/src/host/admin_console/console_users_controller.d.ts +7 -7
- package/build/src/host/admin_validators.d.ts +39 -39
- package/build/src/host/bot_protection.d.ts +1 -1
- package/build/src/host/config_locks.d.ts +1 -1
- package/build/src/host/controllers/account_confirm_controller.js +1 -1
- package/build/src/host/controllers/account_security_controller.js +1 -1
- package/build/src/host/controllers/interaction_controller.js +2 -3
- package/build/src/host/durable/index.d.ts +2 -2
- package/build/src/host/durable/index.js +2 -2
- package/build/src/host/login_methods_state.js +2 -5
- package/build/src/host/login_notify.js +1 -1
- package/build/src/host/oidc_rp_guard.d.ts +1 -1
- package/build/src/host/runtime_settings.js +1 -1
- package/build/src/host/runtime_toggles.d.ts +23 -23
- package/build/src/host/sudo/index.d.ts +1 -1
- package/build/src/host/ui-dist/assets/index-Dp__4wlB.js +155 -0
- package/build/src/host/ui-dist/index.html +1 -1
- package/build/src/host/validators.d.ts +15 -15
- package/build/src/observability/telescope/index.d.ts +2 -2
- package/build/src/observability/telescope/index.js +1 -1
- package/build/src/password/password_manager.js +1 -1
- package/build/src/provider/oidc_service.d.ts +1 -1
- package/build/stubs/ui/react/components/auth_shell.tsx +2 -7
- package/build/stubs/ui/react/pages/consent.tsx +1 -0
- package/build/stubs/ui/react/pages/forgot.tsx +1 -0
- package/build/stubs/ui/react/pages/login.tsx +1 -0
- package/build/stubs/ui/react/pages/mfa-challenge.tsx +1 -0
- package/build/stubs/ui/react/pages/reset.tsx +1 -0
- package/build/stubs/ui/react/pages/signup.tsx +1 -0
- package/build/stubs/ui/react/pages/verify-email.tsx +1 -0
- package/build/types.d.ts +1 -1
- package/package.json +32 -31
- package/stubs/ui/react/components/auth_shell.tsx +2 -7
- package/stubs/ui/react/pages/consent.tsx +1 -0
- package/stubs/ui/react/pages/forgot.tsx +1 -0
- package/stubs/ui/react/pages/login.tsx +1 -0
- package/stubs/ui/react/pages/mfa-challenge.tsx +1 -0
- package/stubs/ui/react/pages/reset.tsx +1 -0
- package/stubs/ui/react/pages/signup.tsx +1 -0
- package/stubs/ui/react/pages/verify-email.tsx +1 -0
- package/build/src/host/ui-dist/assets/index-Cb38N16r.js +0 -155
|
@@ -27,7 +27,7 @@ export declare function deriveLockedSettingKeys(config: Record<string, any>): st
|
|
|
27
27
|
* (onde as rotas moram). Ver `AuthHostOptions` e o docblock de
|
|
28
28
|
* `registerAuthHost`.
|
|
29
29
|
*/
|
|
30
|
-
export declare const POLICY_ROUTE_OPTIONS: readonly [
|
|
30
|
+
export declare const POLICY_ROUTE_OPTIONS: readonly ['social', 'rateLimit', 'sudoMethods', 'admin', 'adminApi'];
|
|
31
31
|
/** Uma opção de política de `AuthHostOptions`. */
|
|
32
32
|
export type PolicyRouteOption = (typeof POLICY_ROUTE_OPTIONS)[number];
|
|
33
33
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* A tela está atrás do `accountGuard` (requer sessão de conta ativa).
|
|
9
9
|
*/
|
|
10
10
|
import '../augmentations.js';
|
|
11
|
-
import {
|
|
11
|
+
import { configuredSudoMethods, isSudoMethodMounted, LAST_METHOD_SESSION_KEY, resolveAvailableMethods, sudoContextFrom, } from '../sudo/runtime.js';
|
|
12
12
|
/**
|
|
13
13
|
* Reexport de compatibilidade. O construtor canônico do `SudoContext` vive em
|
|
14
14
|
* `sudo/runtime.ts` (é runtime do SPI, não detalhe da tela); este caminho
|
|
@@ -9,7 +9,7 @@ import { ACCOUNT_SESSION_KEY } from '../account_session_key.js';
|
|
|
9
9
|
import { AdminSessionsService } from '../admin_sessions_service.js';
|
|
10
10
|
import { syncAdonisAuthLogout } from '../adonis_auth_sync.js';
|
|
11
11
|
import { AvatarUploadError, isAvatarUploadSupported, storeAvatar } from '../avatar_storage.js';
|
|
12
|
-
import { sendEmailChangeConfirmationEmail,
|
|
12
|
+
import { sendEmailChangeConfirmationEmail, sendEmailChangedCompletedEmail, sendEmailChangeNoticeEmail, } from '../default_mailer.js';
|
|
13
13
|
import { translate } from '../i18n.js';
|
|
14
14
|
import { authkitOrigin } from '../origin.js';
|
|
15
15
|
import { resolveRuntimeSettings } from '../runtime_settings.js';
|
|
@@ -3,8 +3,7 @@ import { supportsLoginMethodsPreference, supportsMagicLink, supportsOtpLogin, su
|
|
|
3
3
|
import { AdminSessionsService } from '../admin_sessions_service.js';
|
|
4
4
|
import { guardBotProtection, resolveEffectiveBotProtection } from '../bot_protection.js';
|
|
5
5
|
import { brandFor, isFirstParty } from '../branding.js';
|
|
6
|
-
import { sendMagicLinkEmail } from '../default_mailer.js';
|
|
7
|
-
import { sendOtpUnlockEmail } from '../default_mailer.js';
|
|
6
|
+
import { sendMagicLinkEmail, sendOtpUnlockEmail } from '../default_mailer.js';
|
|
8
7
|
import { translate } from '../i18n.js';
|
|
9
8
|
import { assertLoginAllowed, attemptPasswordLogin, isEmailUnverifiedBlock, } from '../login_attempt.js';
|
|
10
9
|
import { magicChannelProp, normalizeLoginChannel } from '../login_channel.js';
|
|
@@ -13,7 +12,7 @@ import { authkitOrigin } from '../origin.js';
|
|
|
13
12
|
import { createOtpLockout, generateOtpUnlockToken, rawToDbOtpUnlockToken, resolveEffectiveOtpLockout, } from '../otp_lockout.js';
|
|
14
13
|
import { resolveRuntimeSettingsOrNoop } from '../runtime_settings.js';
|
|
15
14
|
import { resolveEffectiveAuthMethods, resolveEffectiveMaintenanceMode, resolveEffectiveRegistration, resolveEffectiveSessionPolicy, } from '../runtime_toggles.js';
|
|
16
|
-
import {
|
|
15
|
+
import { buildTrustedDevicePayload, isTrustedDeviceValid, TRUSTED_DEVICE_COOKIE, } from '../trusted_device.js';
|
|
17
16
|
import { normalizeUserLoginMethods, resolveEffectiveUserLoginMethods, } from '../user_login_methods.js';
|
|
18
17
|
/**
|
|
19
18
|
* Chave i18n do erro de status de conta (disabled/expired) compartilhada pelos
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
import type { DeletionActor } from '../account_deletion_service.js';
|
|
30
30
|
import { type AccountDeleteWorkflowInput } from './account_deletion_workflow.js';
|
|
31
31
|
import { type AccountExportWorkflowInput } from './account_export_workflow.js';
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
32
|
+
export { ACCOUNT_DELETE_WORKFLOW, type AccountDeleteWorkflowInput, type AccountDeletionWorkflowDeps, type DurableStepCtx, defineAccountDeletionWorkflow, type WorkflowBody, } from './account_deletion_workflow.js';
|
|
33
|
+
export { ACCOUNT_EXPORT_WORKFLOW, type AccountExportWorkflowDeps, type AccountExportWorkflowInput, type AccountExportWorkflowResult, type DeliverArtifact, defineAccountExportWorkflow, type PersistArtifact, } from './account_export_workflow.js';
|
|
34
34
|
/**
|
|
35
35
|
* Superfície mínima do `WorkflowEngine` que o enqueue usa (`start` idempotente por
|
|
36
36
|
* run-id). Tipada estruturalmente p/ NÃO acoplar o build ao peer opcional.
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import { ACCOUNT_DELETE_WORKFLOW, } from './account_deletion_workflow.js';
|
|
30
30
|
import { ACCOUNT_EXPORT_WORKFLOW, } from './account_export_workflow.js';
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
31
|
+
export { ACCOUNT_DELETE_WORKFLOW, defineAccountDeletionWorkflow, } from './account_deletion_workflow.js';
|
|
32
|
+
export { ACCOUNT_EXPORT_WORKFLOW, defineAccountExportWorkflow, } from './account_export_workflow.js';
|
|
33
33
|
/**
|
|
34
34
|
* Resolve o `WorkflowEngine` do container — SÓ no caminho durável. Importa
|
|
35
35
|
* `@adonis-agora/durable` dinamicamente (peer opcional), então o barrel principal
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { supportsMagicLink } from '../accounts/account_store.js';
|
|
2
|
-
import {
|
|
3
|
-
import { supportsLoginMethodsPreference } from '../accounts/account_store.js';
|
|
4
|
-
import { resolveEffectiveAuthMethods } from './runtime_toggles.js';
|
|
5
|
-
import { configLockedAuthMethods } from './runtime_toggles.js';
|
|
1
|
+
import { supportsLoginMethodsPreference, supportsMagicLink, supportsPasskeys, } from '../accounts/account_store.js';
|
|
2
|
+
import { configLockedAuthMethods, resolveEffectiveAuthMethods } from './runtime_toggles.js';
|
|
6
3
|
import { normalizeUserLoginMethods, resolveEffectiveUserLoginMethods, } from './user_login_methods.js';
|
|
7
4
|
/**
|
|
8
5
|
* Métodos globais efetivos + pins de config — resolução compartilhada entre o
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sendNewDeviceLoginEmail, sendNewLoginEmail } from './default_mailer.js';
|
|
2
|
-
import {
|
|
2
|
+
import { isTrustedDeviceValid, TRUSTED_DEVICE_COOKIE } from './trusted_device.js';
|
|
3
3
|
/**
|
|
4
4
|
* Centraliza o pós-login bem-sucedido: registra o evento `login.success` e dispara
|
|
5
5
|
* (best-effort) o alerta de NOVO acesso quando o IP nunca foi visto para a conta.
|
|
@@ -75,7 +75,7 @@ export type OidcRpGuardEvents<User> = {
|
|
|
75
75
|
export declare class OidcRpGuard<UserProvider extends SessionUserProviderContract<unknown>> implements GuardContract<RealUser<UserProvider>> {
|
|
76
76
|
#private;
|
|
77
77
|
[symbols.GUARD_KNOWN_EVENTS]: OidcRpGuardEvents<RealUser<UserProvider>>;
|
|
78
|
-
driverName:
|
|
78
|
+
driverName: 'oidc_rp';
|
|
79
79
|
authenticationAttempted: boolean;
|
|
80
80
|
isAuthenticated: boolean;
|
|
81
81
|
isLoggedOut: boolean;
|
|
@@ -17,29 +17,29 @@ import type { SettingsCapability } from './runtime_settings.js';
|
|
|
17
17
|
* que qualquer code-path possa importar a constante e não depender de strings.
|
|
18
18
|
*/
|
|
19
19
|
export declare const SETTING_KEYS: {
|
|
20
|
-
readonly BOT_PROTECTION:
|
|
21
|
-
readonly REGISTRATION:
|
|
22
|
-
readonly REQUIRE_VERIFIED_EMAIL:
|
|
23
|
-
readonly MAINTENANCE_MODE:
|
|
24
|
-
readonly AUTH_METHODS:
|
|
25
|
-
readonly EMAIL_CHANGE:
|
|
26
|
-
readonly SECURITY_NOTIFICATIONS:
|
|
27
|
-
readonly PASSWORD_HISTORY:
|
|
28
|
-
readonly PASSWORD_EXPIRATION:
|
|
29
|
-
readonly SESSION_POLICY:
|
|
30
|
-
readonly LOCKOUT:
|
|
31
|
-
readonly RATE_LIMIT:
|
|
32
|
-
readonly PASSWORD_POLICY:
|
|
33
|
-
readonly NOTIFICATIONS:
|
|
34
|
-
readonly TRUSTED_DEVICES:
|
|
35
|
-
readonly TOKEN_TTL:
|
|
36
|
-
readonly ADMIN_IMPERSONATION:
|
|
37
|
-
readonly ORGANIZATIONS_POLICY:
|
|
38
|
-
readonly ROLES_CATALOG:
|
|
39
|
-
readonly OTP_LOCKOUT:
|
|
40
|
-
readonly SUDO_MODE:
|
|
41
|
-
readonly ACCOUNT_EXPIRATION:
|
|
42
|
-
readonly KEY_ROTATION:
|
|
20
|
+
readonly BOT_PROTECTION: 'bot_protection';
|
|
21
|
+
readonly REGISTRATION: 'registration';
|
|
22
|
+
readonly REQUIRE_VERIFIED_EMAIL: 'require_verified_email';
|
|
23
|
+
readonly MAINTENANCE_MODE: 'maintenance_mode';
|
|
24
|
+
readonly AUTH_METHODS: 'auth_methods';
|
|
25
|
+
readonly EMAIL_CHANGE: 'email_change';
|
|
26
|
+
readonly SECURITY_NOTIFICATIONS: 'security_notifications';
|
|
27
|
+
readonly PASSWORD_HISTORY: 'password_history';
|
|
28
|
+
readonly PASSWORD_EXPIRATION: 'password_expiration';
|
|
29
|
+
readonly SESSION_POLICY: 'session_policy';
|
|
30
|
+
readonly LOCKOUT: 'lockout';
|
|
31
|
+
readonly RATE_LIMIT: 'rate_limit';
|
|
32
|
+
readonly PASSWORD_POLICY: 'password_policy';
|
|
33
|
+
readonly NOTIFICATIONS: 'notifications';
|
|
34
|
+
readonly TRUSTED_DEVICES: 'trusted_devices';
|
|
35
|
+
readonly TOKEN_TTL: 'token_ttl';
|
|
36
|
+
readonly ADMIN_IMPERSONATION: 'admin_impersonation';
|
|
37
|
+
readonly ORGANIZATIONS_POLICY: 'organizations_policy';
|
|
38
|
+
readonly ROLES_CATALOG: 'roles_catalog';
|
|
39
|
+
readonly OTP_LOCKOUT: 'otp_lockout';
|
|
40
|
+
readonly SUDO_MODE: 'sudo_mode';
|
|
41
|
+
readonly ACCOUNT_EXPIRATION: 'account_expiration';
|
|
42
|
+
readonly KEY_ROTATION: 'key_rotation';
|
|
43
43
|
};
|
|
44
44
|
export type SettingKey = (typeof SETTING_KEYS)[keyof typeof SETTING_KEYS];
|
|
45
45
|
/**
|
|
@@ -46,10 +46,10 @@ export declare const sudoMethods: {
|
|
|
46
46
|
oidcStepUp: typeof oidcStepUp;
|
|
47
47
|
magicLink: typeof magicLink;
|
|
48
48
|
};
|
|
49
|
-
export type { SudoMethod, SudoContext, SudoMethodDescriptor, SudoRouteHelpers } from './types.js';
|
|
50
49
|
/**
|
|
51
50
|
* Montagem do `SudoContext` a partir do `HttpContext`. Reexportado aqui por
|
|
52
51
|
* simetria com `sudoMethods` e os tipos: quem escreve um método (ou a rota de
|
|
53
52
|
* callback do `oidcStepUp`) precisa dos três.
|
|
54
53
|
*/
|
|
55
54
|
export { sudoContextFrom } from './runtime.js';
|
|
55
|
+
export type { SudoContext, SudoMethod, SudoMethodDescriptor, SudoRouteHelpers } from './types.js';
|