You are here

function mo_auth_menu in Google Authenticator / 2 Factor Authentication - 2FA 7

Implements hook_menu().

File

./mo_auth.module, line 11
Module file for miniOrange 2FA Module.

Code

function mo_auth_menu() {
  $items['admin/config/people/mo_auth'] = array(
    'title' => 'miniOrange Two-Factor Authentication',
    'description' => 'Configure Two-Factor Authentication settings for your site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_customer_setup',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'mo_auth_customer_setup.inc',
  );
  $items['admin/config/people/mo_auth/customer_setup'] = array(
    'title' => 'Register/Login',
    'weight' => -5,
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'page arguments' => array(
      'mo_auth_customer_setup',
    ),
    'file' => 'mo_auth_customer_setup.inc',
  );
  $items['admin/config/people/mo_auth/setup'] = array(
    'title' => 'Setup Two-Factor',
    'weight' => -4,
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'page arguments' => array(
      'mo_auth_setup_twofactor',
    ),
    'page callback' => 'drupal_get_form',
    'file' => 'mo_auth_setup_twofactor.inc',
  );
  $items['admin/config/people/mo_auth/login_settings'] = array(
    'title' => 'Login Settings',
    'weight' => -3,
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'page arguments' => array(
      'mo_auth_login_settings',
    ),
    'file' => 'mo_auth_login_settings.inc',
  );
  $items['admin/config/people/mo_auth/user_management'] = array(
    'title' => 'User Management',
    'weight' => -2,
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'page arguments' => array(
      'mo_auth_user_management',
    ),
    'file' => 'mo_auth_user_management.inc',
  );
  $items['admin/config/people/mo_auth/licensing'] = array(
    'title' => 'Upgrade Plans',
    'weight' => -1,
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'page arguments' => array(
      'mo_auth_licensing',
    ),
    'file' => 'mo_auth_licensing.inc',
  );
  $items['admin/config/people/mo_auth/support'] = array(
    'title' => 'Support',
    'weight' => -1,
    'type' => MENU_LOCAL_TASK,
    'access arguments' => array(
      'administer site configuration',
    ),
    'page arguments' => array(
      'mo_auth_support',
    ),
    'file' => 'mo_auth_support.inc',
  );
  $items['login/user/%user/authenticate'] = array(
    'title' => 'User account',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_authenticate_user',
      2,
    ),
    // No access restriction as user is not logged in yet.
    'access callback' => TRUE,
    'file' => 'authenticate_user.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['login/user/%user/register'] = array(
    'title' => 'User account',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_inline_registration',
      2,
    ),
    // No access restriction as user is not logged in yet.
    'access callback' => TRUE,
    'file' => 'mo_auth_inline_registration.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/email-verification'] = array(
    'title' => 'Test Email Verification',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_email_verification',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_email_verification.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/google-authenticator'] = array(
    'title' => 'Configure Google Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/microsoft-authenticator'] = array(
    'title' => 'Configure Microsoft Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/authy-authenticator'] = array(
    'title' => 'Configure Authy Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/lastpass-authenticator'] = array(
    'title' => 'Configure LastPass Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/otp-over-sms'] = array(
    'title' => 'Configure OTP Over Email',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_otp_over_sms',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_otp_over_sms.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/otp-over-email'] = array(
    'title' => 'Configure OTP Over SMS',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_otp_over_sms',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_otp_over_sms.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/otp-over-phone'] = array(
    'title' => 'Configure OTP Over Phone Call',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_otp_over_sms',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_otp_over_sms.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/otp-over-sms-and-email'] = array(
    'title' => 'Configure OTP Over SMS And Email',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_otp_over_sms_and_email',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_otp_over_sms_and_email.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/google-authenticator'] = array(
    'title' => 'Test Google Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/microsoft-authenticator'] = array(
    'title' => 'Test Microsoft Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/authy-authenticator'] = array(
    'title' => 'Test Authy Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/lastpass-authenticator'] = array(
    'title' => 'Test LastPass Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/qrcode-authentication'] = array(
    'title' => 'Configure QR Code Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_qrcode_authentication',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_qrcode_authentication.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/qrcode-authentication'] = array(
    'title' => 'Test QR Code Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_qrcode_authentication',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_qrcode_authentication.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/otp-over-sms'] = array(
    'title' => 'Test OTP Over SMS',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_otp_over_sms',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_otp_over_sms.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/otp-over-email'] = array(
    'title' => 'Test OTP Over Email',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_otp_over_sms',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_otp_over_sms.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/otp-over-phone'] = array(
    'title' => 'Test OTP Over Phone Call',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_otp_over_sms',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_otp_over_sms.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/otp-over-sms-and-email'] = array(
    'title' => 'Test OTP Over SMS and Email',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_otp_over_sms_and_email',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_otp_over_sms_and_email.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/kba-authentication'] = array(
    'title' => 'Configure Security Question (KBA)',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_kba',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_kba.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/kba-authentication'] = array(
    'title' => 'Test QR Code Authenticator',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_kba_authentication',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_kba_authentication.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/soft-token'] = array(
    'title' => 'Configure Soft Token',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_qrcode_authentication',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_qrcode_authentication.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/soft-token'] = array(
    'title' => 'Test Soft Token',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_google_authenticator',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_google_authenticator.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/configure/push-notifications'] = array(
    'title' => 'Configure Push Notifications',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_configure_qrcode_authentication',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'configure_qrcode_authentication.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/config/people/mo_auth/setup/user/%user/test/push-notifications'] = array(
    'title' => 'Test Push Notifications',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mo_auth_test_email_verification',
    ),
    'access callback' => 'mo_auth_is_user_logged_in',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'test_email_verification.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['collectattributes'] = array(
    'access callback' => TRUE,
    'page callback' => 'mo_auth_collectattributes',
    'type' => MENU_CALLBACK,
  );
  $items['mo_auth_checkpassword'] = array(
    'access callback' => TRUE,
    'page callback' => 'mo_auth_checkpassword',
    'access arguments' => array(
      'access example ajax',
    ),
    'page arguments' => array(
      1,
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}