• Has required fields validator

    Parameters

    • passwordValidateStrategy: PasswordValidateStrategy

      injected password validate strategy

    • isExistingEmail: ((l, email) => Promise<boolean>)

      injected function use to check if email is taken

        • (l, email): Promise<boolean>
        • Parameters

          • l: Logger
          • email: string

          Returns Promise<boolean>

    • targetField: TargetField

      which request field to check to get email value

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

    Returns Promise<number>

    200 Status OK

    Description

    This validator will check if required fields are provided by applying the following steps in sequence:

    1. Check if email and password exist in request body

    1.1. Validate email and password then return 200 Status OK

    1. Check if provider and providerId exist in request body

    2.1. Validate provider and providerId then return 200 Status OK

    Throws

    400 NBError Bad Request

    • Not enough parameters provided

Generated using TypeDoc