nooschain / auth/api-auth / resolveApiActor
Function: resolveApiActor()
resolveApiActor(
db,headers,options?):Promise<ApiAuthResult>
Defined in: auth/api-auth.ts:37
Resolves an HTTP request into a NOOSChain API actor.
Resolution order is bearer token first, then the development public-key header when explicitly allowed outside production, then anonymous. In production mode a missing/invalid bearer token is rejected by the session store so protected routes fail closed instead of silently becoming anonymous.
Parameters
db
headers
options?
allowDevPublicKeyHeader?
boolean
authSessionStore?
productionMode?
boolean
Returns
Promise<ApiAuthResult>