interface IAuthStrategy
Since 0.1.0

Authentication strategy interface. Implementations extract credentials from a request and return a principal, or null if the strategy does not apply.

Properties

readonly
name: string

Strategy name for identification.

Methods

authenticate(request: IRequest): Promise<IPrincipal | null>

Attempt to authenticate the request.

Usage

import { type IAuthStrategy } from "auth-plugin/src/index.ts";