Skip to content

Documentation / @super-line/server / AuthResult

Type Alias: AuthResult<C>

AuthResult<C> = { [R in RoleOf<C>]: { ctx: unknown; role: R } }[RoleOf<C>]

Defined in: index.ts:49

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.