function mo_auth_build_form_content in Google Authenticator / 2 Factor Authentication - 2FA 7
1 call to mo_auth_build_form_content()
File
- ./
authenticate_user.inc, line 262 - This is used to authenticate user during login.
Code
function mo_auth_build_form_content($form, $user, $base_url, $authType, $challenge_response, $success_form = TRUE, $empty_token = FALSE) {
switch ($authType['code']) {
case AuthenticationType::$OTP_OVER_EMAIL['code']:
return mo_auth_build_otp_over_email_form($form, $base_url, $challenge_response, $success_form);
case AuthenticationType::$EMAIL_VERIFICATION['code']:
return mo_auth_build_oobemail_form($form, $base_url, $challenge_response);
case AuthenticationType::$GOOGLE_AUTHENTICATOR['code']:
return mo_auth_build_google_authenticator_form($form, $user, $base_url, $challenge_response, $success_form, $empty_token);
case AuthenticationType::$QR_CODE['code']:
return mo_auth_build_qrcode_authentication_form($form, $base_url, $challenge_response);
case AuthenticationType::$KBA['code']:
return mo_auth_build_kba_authentication_form($form, $base_url, $challenge_response, $success_form);
case AuthenticationType::$SOFT_TOKEN['code']:
return mo_auth_build_soft_token_form($form, $base_url, $challenge_response, $success_form, $empty_token);
case AuthenticationType::$PUSH_NOTIFICATIONS['code']:
return mo_auth_build_push_notifications_form($form, $base_url, $challenge_response);
case AuthenticationType::$SMS['code']:
return mo_auth_build_otp_over_sms_form($form, $base_url, $challenge_response, 'OTP OVER SMS', $success_form, $empty_token);
case AuthenticationType::$OTP_OVER_PHONE['code']:
return mo_auth_build_otp_over_sms_form($form, $base_url, $challenge_response, 'OTP OVER PHONE', $success_form, $empty_token);
case AuthenticationType::$SMS_AND_EMAIL['code']:
return mo_auth_build_otp_over_sms_form($form, $base_url, $challenge_response, 'OTP OVER SMS AND EMAIL', $success_form, $empty_token);
default:
return $form;
}
}