Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EmptyAuthHandlerOptions

Hierarchy

  • GenericAuthHandlerOptions
    • EmptyAuthHandlerOptions

Indexable

[key: string]: any

Index

Properties

Optional allowAnonymous

allowAnonymous: undefined | false | true

Enable if unauthorized access should still be possible and the middleware should populate the request with user information.

Optional anonymousUserValue

anonymousUserValue: any | null

If anonymous access is allowed, this value will be passed to req.user, defaults to null.

Optional catch

Optional headerName

headerName: undefined | string

Authorization header name, defaults to Authorization

Optional strategy

strategy: undefined | "none"

Optional unauthorized

unauthorized: undefined | ((req: PossiblyAuthedNextApiRequest, res: NextApiResponse) => Promise<void> | void)

Override the default unauthorized responding behaviour.

Generated using TypeDoc