code wiki / (root) / nx_login_gate.nx

nx_login_gate.nx

buildroot/runtime/nx_login_gate.nx

4270 B90 linesdepth 8pulls 11 transitivereach 2 importersview sourcekind gate/prooftopic login
docsdependenciesstructsconstsfunctions

about

nx_login_gate.nx -- ★NISHI LOGIN: the UNIFIED sovereign auth gate. Validates a request's credential in ANY presentation -- `X-Nishi-Cap: <cap>` (API), `Authorization: Bearer <cap>` (OAuth/MCP), or `Authorization: Basic <user:cap>` (git, curl, browsers) -- against the ocap capability system for a REQUIRED SCOPE. This is the shared validator behind the edge `auth=` switch AND the git gate: one credential (a scoped, attenuable, revocable cap), three wire forms. Composes capt_verify (nx_cap_token) + basic_auth_decode (nx_basic_auth) + b64_decode. The OPAQUE session path (browser SSO) layers on top via nx_site_auth. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_cap_token.nx nx_basic_auth.nx nx_login_gate.nx nx_login_gate_gate.nx nx_sovgit_git.nx

imports: nx_syscalls.nxnx_cap_token.nxnx_basic_auth.nx

imported by: nx_login_gate_gate.nxnx_sovgit_git.nx

structs

none

consts

none

functions

12func lg_ci_eq(s: *u8, lower: *u8, len: i64) -> i64
24func lg_header(req: *u8, n: i64, name: *u8, namelen: i64, voff: *i64, vlen: *i64) -> i64
called by 1: lg_extract_cap calls 1: lg_ci_eq
52func lg_extract_cap(req: *u8, n: i64, out: *u8, cap: i64) -> i64
82func login_gate_cap(req: *u8, n: i64, secret: *u8, seclen: i64, scope: *u8, scopelen: i64, now: i64) -> i64
90func main() -> i64 { return 0 }