• A type-guard function that determines if a given express request object is an AuthdReq object.

    If you pass in an obstructions array, it will be filled with any reasons why the request is not an AuthdReq.

    NOTE: This is generally a bad pattern. It's better to use the assertAuthdReq function below, which is a type-assertion function and will throw a useful HttpError if the request is not an AuthdReq.

    Type Parameters

    • T

    Parameters

    • _req: T
    • Optional _obs: {
          code: string;
          text: string;
      }[]

    Returns _req is AuthdReq<T>

Generated using TypeDoc