Skip to content

Documentation / @super-line/server / AuthResult

Type Alias: AuthResult<C> ​

AuthResult<C> = { [R in RoleOf<C>]: { connectionId?: string; ctx: unknown; env?: EnvOf<C, R>; role: R } }[RoleOf<C>]

Defined in: index.ts:105

The discriminated value authenticate returns: a role (one of the contract's roles) plus its ctx. Returning different ctx shapes per role narrows both the handler surface and ctx together.

Type Parameters ​

C ​

C extends Contract

Released under the MIT License.