Skip to content
mercury framework
GitHub

AuthPlugin

AuthPlugin = object

Defined in: types/channel-types/index.ts:250

An auth provider, declared in auth in mercury.config.ts (one, or several tried in order): it tells a channel whose callers carry their own credentials (HTTP) who is calling. build reads its own config from env and throws when it’s missing, so a misconfigured provider is left out (closed), never open. name is unique on an instance, and the principals a provider returns carry it as their provider.

apiVersion: number

Defined in: types/channel-types/index.ts:251


build: (ctx) => Authenticate

Defined in: types/channel-types/index.ts:253

Record<string, string | undefined>

(msg) => void

Authenticate


name: string

Defined in: types/channel-types/index.ts:252