You are here

function feeds_oauth_menu in Feeds OAuth 7

Same name and namespace in other branches
  1. 6 feeds_oauth.module \feeds_oauth_menu()

Implements hook_menu().

File

./feeds_oauth.module, line 44
The module file.

Code

function feeds_oauth_menu() {

  // For OAuth 1.0
  $items['feeds/oauth/authenticate/%'] = array(
    'title' => 'OAuth authentication',
    'type' => MENU_CALLBACK,
    'page callback' => 'feeds_oauth_authenticate',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
  );
  $items['feeds/oauth/callback/%'] = array(
    'title' => 'OAuth callback',
    'type' => MENU_CALLBACK,
    'page callback' => 'feeds_oauth_callback',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
  );

  // For OAuth 2.0
  $items['feeds/oauth2/authenticate/%'] = array(
    'title' => 'OAuth2 authentication',
    'type' => MENU_CALLBACK,
    'page callback' => 'feeds_oauth_authenticate2',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
  );
  $items['feeds/oauth2/callback/%'] = array(
    'title' => 'OAuth2 callback',
    'type' => MENU_CALLBACK,
    'page callback' => 'feeds_oauth_callback2',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
  );

  // Admin
  $items['admin/config/services/feeds-oauth'] = array(
    'title' => 'Feeds OAuth',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'feeds_oauth_admin',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
  );
  return $items;
}