Implement native login and session initialization (#56)
All checks were successful
Native code generation / deterministic (push) Successful in 11m53s
Imaging and meshing gate / native (push) Successful in 4m3s
JPEG 2000 feature / linux (push) Successful in 2m33s
Native Rust workspace compile / compile (push) Successful in 4m3s
Skia feature / linux (push) Successful in 31m24s

This commit is contained in:
2026-08-09 18:18:28 +00:00
parent aa269f1785
commit 3951bdb809
15 changed files with 3992 additions and 1355 deletions

View File

@@ -66,14 +66,32 @@ the last simulator reports `SimShutdown`. Explicit shutdown preserves the
caller-provided reason/message and sends `CloseCircuit` only for client or
network-timeout shutdowns.
## Login behavior
The native login path constructs the reference LLSD request, including the C#
MD5 password form, token/MFA fields, viewer identity, platform metadata,
requested options, and normalized home/last/region start locations. It uses the
client's injectable capability HTTP transport, limits redirects and server
delays, observes linked caller/client cancellation, and reports the mapped
`LoginStatus` transitions. Only a successful response invokes registered login
callbacks and proceeds to an ACK-gated initial simulator connection.
`LoginResponseData` parses the session and circuit identifiers, home and look-at
vectors, simulator endpoint and dimensions, seed capability, inventory roots and
skeletons, buddy rights, account benefits, service URLs, category/config arrays,
premium packages, and initial outfit. A rejected, malformed, timed-out, or
canceled login leaves no simulator installed. Passwords, login tokens, MFA
hashes, session identifiers, seed capabilities, and estate access tokens are
excluded from `Debug` output and diagnostic messages.
The deterministic tests use loopback fake simulators and require no live grid:
```sh
cargo test -p libremetaverse --test network_manager
```
They cover ACK-gated circuit setup, typed handshake reply/state, ping response,
CAPS enable, UDP disable, current/seed selection, callback ordering and
filtering, RAII unregistration, runtime-neutral async calls, concurrent
registration/removal, reentrant/concurrent disconnect, and keepalive timeout
reasons.
They cover login hashing, redirects, cancellation and initial handoff alongside
ACK-gated circuit setup, typed handshake reply/state, ping response, CAPS enable,
UDP disable, current/seed selection, callback ordering and filtering, RAII
unregistration, runtime-neutral async calls, concurrent registration/removal,
reentrant/concurrent disconnect, and keepalive timeout reasons.