You are here

function auth0_menu in Auth0 Single Sign On 7.2

Implements hook_menu().

File

./auth0.module, line 25

Code

function auth0_menu() {
  $items = array();

  // Add the callback controller.
  $items['auth0/callback'] = array(
    'description' => 'Callback handler from auth0',
    'page callback' => 'auth0_callback',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['auth0/verify_email'] = array(
    'description' => 'Verify email action',
    'page callback' => 'auth0_verify_email_page',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['user/%user/auth0'] = array(
    'title' => 'Auth0',
    'description' => 'Verify email action',
    'page callback' => 'auth0_user_info_page',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'administer users',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 100,
  );

  // Add an admin configuration page.
  $items['admin/config/people/auth0'] = array(
    'title' => 'Auth0 Login Settings',
    'description' => 'Configure your auth0 account and widget.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'auth0_basic_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
  );

  // Basic configuration tab.
  $items['admin/config/people/auth0/basic'] = array(
    'title' => 'Basic',
    'description' => 'Configure your auth0 account and widget.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'auth0_basic_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );

  // Advanced configuration tab.
  $items['admin/config/people/auth0/advanced'] = array(
    'title' => 'Advanced',
    'description' => 'Configure your auth0 account and widget.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'auth0_advanced_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
  );
  return $items;
}