LuxelEspañol

Luxel v0.2 · Reference · part 10 of 14

API reference (10)

ExportKindDescription
IdentityConfigtype—
identityKeyconstWhat a session is bound to: the token's issuer and subject, hashed (kept in the principal). */
IdentityOutcometype—
IdentityPrincipalFntypeExported by the app's bindings module as identityPrincipal (see Bindings): turns the verified claims into the session's principal (user id, roles, display name), or null to refuse this identity (the request answers 403 and no session is opened). Called once per new session, never per request. The function never reads a request header: it receives only what was verified. /
IdentityTokenHeadertypeThe request header the gateway forwards the token in. */
isJwtAlgorithmconst—
isSameOriginfunctionOrigin must name this host: https always, http only on loopback (local runs). Sprint 11 (red team RT-11): it must be exactly a serialized origin (no path, no trailing slash) and its scheme must be the request's: https on a TLS connection; else the scheme the proxy forwards (the last X-Forwarded-Proto entry); else http on a loopback name (a direct local run) and https elsewhere (TLS terminated in front, as production requires). /
isSessionIdconst—
jsonLoggerconstOne JSON line per entry on stdout/stderr. */
JwksCacheinterface—
JwksCacheOptionsinterface—
JWT_ALGORITHMSconstEvery algorithm this module can verify. Asymmetric only: no none, no HS*. */
JwtAlgorithmtype—
JwtClaimsinterfaceThe claims of a verified token. Only iss, sub and exp are certain to be there. */
JwtRefusaltype—
JwtVerifierinterface—
JwtVerifierOptionsinterface—
JwtVerifyResulttypeOn success, also the key that verified the signature (S1 review round 5: a later check asks that it still holds). */
KeyLookuptype—
KeySourceinterfaceWhere a verifier gets its keys. The JWKS cache below is one; a test may give another. */
loadViewsfunctionThe views a host serves: the bindings' hand-written adapters plus, for handlers written with defineEvent/defineLoad (ADR-018), the adapters @luxel-framework/server builds with the framework's idempotency, transaction, version control and authorization. Shared with the security tests. /
LogFieldstype—
loggedPathfunctionSprint 13.5 (S1 review round 3): a request path as it may be logged. The path is whatever a client sent, and a bearer token (a JWT is at least ~100 characters with its signature) could be put in it: every segment longer than 48 characters is replaced by its length, and the whole is capped. No query is ever logged (callers pass the path without it). /
Loggertype—
logoutFormAllowedfunctionSprint 12.3 (C15): the proof of origin of a sign-out form (‹Logout>), which carries no token: the browser's own account of the request, every part required. - Sec-Fetch-Site: same-origin, present: the form is in a page of this origin. A page of another site, of a sibling subdomain (same-site), a sandboxed frame or a data: document cannot make a browser send it, and a script cannot set it. A browser that sends no Fetch Metadata cannot use the form (as with a static view's form, ADR-049); nothing falls back to a weaker check. - Sec-Fetch-Mode: navigate and Sec-Fetch-Dest: document: a form's top-level navigation. - Origin, present: this origin, or null. A browser writes null in a navigation that leaves a page with Referrer-Policy: no-referrer, which every page of luxel-host has; any other origin is refused, whatever the rest says. The body is never read (the form has no field). The session cookie is SameSite=Strict besides: a cross-site navigation does not carry it. /
logoutRedirectTargetfunctionSprint 12.3 (C15): the grammar of the sign-out redirect, "/‹variant>/‹view>": an absolute path of this origin with exactly two segments of lowercase names. No scheme, no host ("//", "/\\"), no query, no fragment, no dots, no encoding. The one definition: createGateway refuses any other logoutRedirect, and luxel-host reads its config's logout with it. /
Edit this page on GitHub

This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app.

Measured when the site is built: the runtime files this page loads, compressed as they are sent.

Made by IntiOps. The Luxel 0.1.0 betas are on npm (0.1.0-beta.1, 0.1.0-beta.2), with an alpha of 0.2 (0.2.0-alpha.1): no external security review yet.