nx_modern_auth_flow.nx
buildroot/runtime/hub/nx_modern_auth_flow.nx
about
dependencies 5 imports · 32 importers
diagram shows first 10 each side; +0 more imports, +22 more importers in the complete lists below.
imports: nx_syscalls.nxnx_no_cookie_session.nxnx_opaque_pake.nxnx_user_account_store.nxnx_bip39.nx
imported by: nx_authz_session_gate.nxnx_browser_forms_e2e_gate.nxnx_docportal_admin_daemon.nxnx_docportal_admin_daemon_gate.nxnx_docportal_multipart_gate.nxnx_email_portal_daemon.nxnx_email_portal_gate.nxnx_media_e2e_gate.nxnx_media_server.nxnx_mgmt_api_gate.nxnx_modauth_arm.nxnx_modauth_arm_vault.nxnx_modauth_e2e_gate.nxnx_modauth_probe.nxnx_nojs_session_gate.nxnx_opaque_login.nxnx_realm_isolation_gate.nxnx_site_auth.nxnx_site_auth_gate.nxnx_siteedit_daemon.nxnx_siteedit_gate.nxnx_sitegen_studio_daemon.nxnx_social_auth_recover.nxnx_social_auth_recover_gate.nxnx_status_daemon.nxnx_status_daemon_gate.nxnx_studio_daemon_gate.nxnx_wiki_admin_wiring.nxnx_wiki_https_daemon_mv.nxnx_wiki_page_save.nxnx_wiki_version.nxnx_wiki_vhost_table.nx
structs
| 111 | struct NxAuthContext |
consts
| 76 | const NX_MAUTH_OK: i64 = 0 |
| 77 | const NX_MAUTH_BAD_INPUT: i64 = 1400 |
| 78 | const NX_MAUTH_BAD_CONTEXT: i64 = 1401 |
| 79 | const NX_MAUTH_NO_SESSION: i64 = 1402 // no token header in request |
| 80 | const NX_MAUTH_INVALID_SESSION: i64 = 1403 // signature failed |
| 81 | const NX_MAUTH_EXPIRED: i64 = 1404 |
| 82 | const NX_MAUTH_REALM_MISMATCH: i64 = 1405 |
| 83 | const NX_MAUTH_BUF_OVERFLOW: i64 = 1406 |
| 84 | const NX_MAUTH_NOT_IMPLEMENTED: i64 = 1407 // M2/M3/M4 prereq missing |
| 85 | const NX_MAUTH_RATE_LIMITED: i64 = 1408 |
| 86 | const NX_MAUTH_USER_NOT_FOUND: i64 = 1409 |
| 87 | const NX_MAUTH_WRONG_PASSPHRASE: i64 = 1410 |
| 88 | const NX_MAUTH_RECOVERY_MISMATCH: i64 = 1411 |
| 91 | const NX_MAUTH_MAX_REALM_LEN: i64 = 128 |
| 92 | const NX_MAUTH_MAX_USER_HANDLE_LEN: i64 = 64 |
| 93 | const NX_MAUTH_MAX_PASSPHRASE_LEN: i64 = 256 |
| 94 | const NX_MAUTH_MAX_MNEMONIC_LEN: i64 = 512 // 24 BIP39 words * ~10 chars |
| 95 | const NX_MAUTH_DEFAULT_SESSION_TTL_S: i64 = 900 // 15 min per charter §7 |
| 96 | const NX_MAUTH_HARD_MAX_TTL_S: i64 = 86400 // 24h hard cap |
| 97 | const NX_MAUTH_DEFAULT_ARGON2ID_M_COST: i64 = 65536 // 64 MiB per OWASP 2026 |
| 98 | const NX_MAUTH_DEFAULT_ARGON2ID_T_COST: i64 = 3 |
| 99 | const NX_MAUTH_DEFAULT_ARGON2ID_P_COST: i64 = 4 |
| 100 | const NX_MAUTH_DEFAULT_RATE_LIMIT_PER_MIN: i64 = 5 |
| 102 | const NX_MAUTH_ED25519_PRIV_BYTES: i64 = 32 |
| 103 | const NX_MAUTH_ED25519_PUB_BYTES: i64 = 32 |
| 104 | const NX_MAUTH_SESSION_TOKEN_BYTES: i64 = 152 // matches M5 NX_NCS_TOKEN_BYTES |
| 188 | const NX_MAUTH_OPAQUE_CONTEXT_LEN: i64 = 11 |
| 264 | const NX_MAUTH_REC_SUFFIX_LEN: i64 = 4 |
functions
| 140 | func nx_auth_context_init( |
| 189 | func _ma_load_context(out: *u8) -> i64 called by 1: _ma_mk_cfgs |
| 197 | func _ma_store_path(ctx: *NxAuthContext) -> *u8 |
| 202 | func _ma_server_ake_keys(ctx: *NxAuthContext, out_priv_32: *u8, out_pub_33: *u8) -> i64 |
| 214 | func _ma_cred_id(user_id_hash_32: *u8, out_64: *u8) -> i64 |
| 230 | func _ma_mk_cfgs( |
| 265 | func _ma_rec_handle(user_handle: *u8, user_handle_n: i64, out: *u8) -> i64 |
| 278 | func _ma_register_credential( |
| 325 | func _ma_verify_credential( |
| 383 | func _ma_issue_recovery( |
| 417 | func nx_modern_auth_register( |
| 459 | func nx_modern_auth_login( |
| 519 | func nx_modern_auth_validate_session( called by 12: mainmainmainolg_whoamiri_validatenx_sa_validate+6 calls 3: sys_mmapnx_ncs_derive_realm_id_hashnx_ncs_validate_token |
| 570 | func nx_modern_auth_refresh_session( |
| 608 | func nx_modern_auth_recover( |