Class: Xeno::ApiController

Inherits:
ActionController::API
  • Object
show all
Defined in:
app/controllers/xeno/api_controller.rb

Overview

Base for every engine endpoint. Auth fails closed: without a configured authenticate lambda, everything is 401. The lambda receives the request; a falsy return is a 401; its truthy return value is the request principal (stamped onto sessions by the HTTP channel).

Constant Summary collapse

DEV_PRINCIPAL =

The development fallback principal (no auth lambda configured). It matches every session — in development only — so the dev UI and localhost curl stay usable.

{ "user" => "dev" }.freeze