You are here

function tokenauth_menu in Token authentication 7

Same name and namespace in other branches
  1. 5 tokenauth.module \tokenauth_menu()
  2. 6.2 tokenauth.module \tokenauth_menu()
  3. 6 tokenauth.module \tokenauth_menu()

Implements hook_menu().

File

./tokenauth.module, line 31

Code

function tokenauth_menu() {
  $items['admin/config/services/tokenauth'] = array(
    'title' => 'Token authentication',
    'description' => 'Configure token behavior to allow users to authenticate per page-load via URL.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'tokenauth_admin_settings',
    ),
    'access arguments' => array(
      'administer tokenauth',
    ),
    'file' => 'tokenauth.pages.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/config/services/tokenauth/reset'] = array(
    'title' => 'Reset tokens',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'tokenauth_reset_confirm',
    ),
    'access arguments' => array(
      'administer tokenauth',
    ),
    'file' => 'tokenauth.pages.inc',
    'type' => MENU_CALLBACK,
  );
  $items['user/%user/tokenauth'] = array(
    'title' => 'Token authentication',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'tokenauth_user_profile_form',
      1,
    ),
    'access callback' => 'tokenauth_profile_access',
    'access arguments' => array(
      1,
    ),
    'file' => 'tokenauth.pages.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['user/%user/tokenauth/reset'] = array(
    'title' => 'Reset token',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'tokenauth_user_reset_confirm',
    ),
    'access callback' => 'tokenauth_profile_access',
    'access arguments' => array(
      1,
    ),
    'file' => 'tokenauth.pages.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}