code wiki / (root) / nx_opaque_login.nx

nx_opaque_login.nx

buildroot/runtime/nx_opaque_login.nx

8581 B131 linesdepth 15pulls 44 transitivereach 44 importersview sourcekind librarytopic opaque
docsdependenciesstructsconstsfunctions

about

nx_opaque_login.nx -- no-cookie OPAQUE login LOGIC (the wiki's model, FULL OPAQUE / modauth, RFC 9807). "Opaque" = the no-cookie passphrase login the wiki uses: the server runs the OPAQUE aPAKE in-process (storing only the OPAQUE envelope -- NO password-equivalent at rest), then mints an Ed25519-signed no-cookie session token. The client holds it in sessionStorage and sends `X-Nishi-Session: <base64>` per request -- NO cookies (cardinal C1). This module is the THIN seam between HTTP and the already- RFC-KAT'd modauth API: it composes nx_modern_auth_{register,login,validate} + base64 wire-encoding so a socket daemon (or a gate) can drive the full login over the wire. No shortcuts: full OPAQUE, production argon2id KSF (caller-supplied so gates can run light while the daemon runs 64 MiB/t3/p4), every reject path. module: nishi-core.auth.opaque_login capability: ACCESS_CONTROL / auth

dependencies 3 imports · 33 importers

nx_modern_auth_flow.nx nx_user_account_store.nx nx_base64.nx nx_opaque_login.nx nx_ad_banner_gated_daemon.nx nx_audio_gate_proof_test.nx nx_connect_appd.nx nx_connect_auth_gate.nx nx_docportal_admin_daemon.nx nx_email_portal_daemon.nx nx_fin_route_gate.nx nx_gallery_gateway.nx nx_gen_gateway.nx nx_gen_gateway_daemon.nx

diagram shows first 10 each side; +0 more imports, +23 more importers in the complete lists below.

imports: nx_modern_auth_flow.nxnx_user_account_store.nxnx_base64.nx

imported by: nx_ad_banner_gated_daemon.nxnx_audio_gate_proof_test.nxnx_connect_appd.nxnx_connect_auth_gate.nxnx_docportal_admin_daemon.nxnx_email_portal_daemon.nxnx_fin_route_gate.nxnx_gallery_gateway.nxnx_gen_gateway.nxnx_gen_gateway_daemon.nxnx_gen_gateway_gate.nxnx_gen_live_probe.nxnx_hr_access.nxnx_hr_access_gate.nxnx_hub_gw.nxnx_lan_signup_daemon.nxnx_lan_signup_routes.nxnx_lan_signup_socket_gate.nxnx_mesh_gateway.nxnx_office_daemon.nxnx_opaque_login_daemon.nxnx_opaque_login_gate.nxnx_opaque_login_routes.nxnx_project_serve.nxnx_recover_gate.nxnx_relate_daemon.nxnx_signup_origin_gate.nxnx_studio_gate.nxnx_torrent_authn.nxnx_torrent_authn_gate.nxnx_torrent_gateway.nxnx_torrent_gw.nxnx_vault_gateway.nx

structs

none

consts

19const OLG_REGFLAG_PATH: *u8 = "/volume1/homes/elderwesto/nishihost/registration_open"
20const OLG_LENBUF: i64 = 16
21const OLG_ASCII_ONE: i64 = 49

functions

32func olg_registration_open() -> i64 { return olg_registration_open_at(OLG_REGFLAG_PATH) }
34func olg_registration_open_at(flagpath: *u8) -> i64
53func olg_ctx_setup_ttl(ctx: *NxAuthContext, keys_path: *u8, store_path: *u8,
65func olg_ctx_setup(ctx: *NxAuthContext, keys_path: *u8, store_path: *u8,
72func olg_register(ctx: *NxAuthContext, handle: *u8, hn: i64, pw: *u8, pwn: i64,
81func olg_recover(ctx: *NxAuthContext, handle: *u8, hn: i64, mnemonic: *u8, mnn: i64, newpw: *u8, newpwn: i64,
88func olg_login(ctx: *NxAuthContext, handle: *u8, hn: i64, pw: *u8, pwn: i64,
101func olg_whoami(ctx: *NxAuthContext, b64: *u8, b64n: i64, now_s: i64,
114func olg_refresh(ctx: *NxAuthContext, b64: *u8, b64n: i64, now_s: i64,