Interface FiefAuthParameters

Parameters to instantiate a fiefAuth middleware.

Hierarchy

  • FiefAuthParameters

Properties

client: Fief

Instance of a Fief client.

forbiddenResponse?: ((req, res) => Promise<void>)

Type declaration

    • (req, res): Promise<void>
    • Optional handler for forbidden response.

      The default handler will return a plain text response with status code 403.

      Parameters

      • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
      • res: Response<any, Record<string, any>>

      Returns Promise<void>

tokenGetter: TokenGetter<Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>>

TokenGetter function.

unauthorizedResponse?: ((req, res) => Promise<void>)

Type declaration

    • (req, res): Promise<void>
    • Optional handler for unauthorized response.

      The default handler will return a plain text response with status code 401.

      Parameters

      • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
      • res: Response<any, Record<string, any>>

      Returns Promise<void>

userInfoCache?: IUserInfoCache

An instance of a IUserInfoCache class.

Generated using TypeDoc