You are here

function miniorange_2fa_inline_registration::mo_auth_inline_registration_page_four in Google Authenticator / 2 Factor Authentication - 2FA 8

Same name and namespace in other branches
  1. 8.2 src/Form/miniorange_2fa_inline_registration.php \Drupal\miniorange_2fa\form\miniorange_2fa_inline_registration::mo_auth_inline_registration_page_four()
1 call to miniorange_2fa_inline_registration::mo_auth_inline_registration_page_four()
miniorange_2fa_inline_registration::buildForm in src/Form/miniorange_2fa_inline_registration.php
Form constructor.

File

src/Form/miniorange_2fa_inline_registration.php, line 394

Class

miniorange_2fa_inline_registration

Namespace

Drupal\miniorange_2fa\form

Code

function mo_auth_inline_registration_page_four(array $form, \Drupal\Core\Form\FormStateInterface $form_state, $success_status, $message) {
  $storage = $form_state
    ->getStorage();
  $method = $storage['page_three_values']['mo_auth_method'];
  if ($method == AuthenticationType::$GOOGLE_AUTHENTICATOR['code']) {
    return $this
      ->mo_auth_get_google_authentication_form($form, $form_state, $success_status);
  }
  elseif ($method == AuthenticationType::$KBA['code']) {
    return $this
      ->mo_auth_get_kba_authentication_form($form, $form_state);
  }
  elseif ($method == AuthenticationType::$QR_CODE['code'] || $method == AuthenticationType::$PUSH_NOTIFICATIONS['code'] || $method == AuthenticationType::$SOFT_TOKEN['code']) {
    return $this
      ->mo_auth_get_qrcode_authentication_form($form, $form_state, $success_status);
  }
  elseif ($method == AuthenticationType::$SMS['code'] || $method == AuthenticationType::$SMS_AND_EMAIL['code'] || $method == AuthenticationType::$EMAIL['code'] || $method == AuthenticationType::$OTP_OVER_PHONE['code']) {
    return $this
      ->mo_auth_get_otp_over_sms_authentication_form($form, $form_state, $success_status, $message);
  }
}