The @RegisterClass key used to look up this extension in ClassFactory.
Must match the second argument of @RegisterClass(BaseServerExtension, 'DriverClass').
Whether this extension is enabled. Disabled extensions are skipped during loading.
OptionalOwnsWhen true, this extension owns the CORS policy for every request under its RootPath,
and MJServer's global CORS middleware skips those paths. Defaults to false.
Without this, MJServer's global CORS runs ahead of every extension. It reflects any
allowed origin onto the extension's responses, including its refusals, and it answers
every preflight (OPTIONS) with 204 itself, so the extension's own OPTIONS handler
never runs. An extension with its own origin policy, such as a public pre-auth endpoint
whose allowed origins are set per resource, cannot enforce that policy.
With OwnsCORS: true:
Access-Control-* header is added to any response under RootPath by MJServer;OPTIONS itself (for example with the cors package and an origin callback);Matching follows Express mount semantics: case-insensitive, on a path-segment
boundary (/ballot owns /ballot and /ballot/x, not /ballots). Disabled entries
own nothing. MJServer's auth middleware passes OPTIONS through, so the flag also
works for 'post-auth' extensions; their 401 responses then carry no CORS headers
unless the extension adds them.
Open Apps can set this in their published MJ_SERVER_EXTENSIONS entries; the host
mj.config.cjs serverExtensions[] overlay can override it by DriverClass.
OptionalPhaseLifecycle phase for this extension. Defaults to the extension class's DefaultPhase
(usually 'pre-auth') when not specified.
URL path prefix for this extension's routes (e.g., '/webhook/slack').
The extension registers its routes under this prefix on the Express app.
Extension-specific configuration. The shape varies by extension type.
For messaging adapters, this contains AgentID, BotToken, etc.
The extension is responsible for parsing and validating its own settings.
Configuration for a server extension instance.
Loaded from the host
serverExtensions[]inmj.config.cjs, and/or discovered from installed Open App server packages (MJ_SERVER_EXTENSIONSexport orpackage.jsonmemberjunction.serverExtensions). Host entries overlay discovered ones byDriverClass.Each entry corresponds to one extension instance. The
DriverClassfield is used to look up the registered class viaClassFactory.CreateInstance().Example