You are here

function janrain_capture_menu in Janrain Registration 7.4

Same name and namespace in other branches
  1. 6 janrain_capture.module \janrain_capture_menu()
  2. 7 janrain_capture.module \janrain_capture_menu()
  3. 7.2 janrain_capture.module \janrain_capture_menu()
  4. 7.3 janrain_capture.module \janrain_capture_menu()

Implements hook_menu().

File

./janrain_capture.module, line 155
This module implements authentication endpoints for Janrain Capture.

Code

function janrain_capture_menu() {
  $items['janrain_capture/oauth'] = array(
    'title' => t('Capture Oauth Receiver'),
    'page callback' => 'janrain_capture_oauth',
    'access callback' => 'janrain_capture_oauth_access_callback',
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $items['janrain_capture/admin_signin'] = array(
    'title' => t('Janrain Capture Admin Signin Verification'),
    'page callback' => 'janrain_capture_admin_signin',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $items['janrain_capture/signin_redirect'] = array(
    'title' => t('Capture redirect page'),
    'page callback' => 'janrain_capture_signin_redirect',
    'access callback' => 'user_is_logged_in',
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $items['janrain_capture/profile'] = array(
    'title' => t('Capture Profile'),
    'page callback' => 'janrain_capture_profile',
    'access callback' => 'user_is_logged_in',
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $items['janrain_capture/profile_sync'] = array(
    'title' => t('Capture Profile Receiver'),
    'page callback' => 'janrain_capture_profile_sync',
    'access callback' => 'user_is_logged_in',
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $items['janrain_capture/resend_verification_email'] = array(
    'title' => t('Capture Verification Email Resent'),
    'page callback' => 'janrain_capture_resend_verification_email',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $items['janrain_capture/token_expired/%'] = array(
    'title' => t('Capture Token Expired'),
    'page callback' => 'janrain_capture_token_expired',
    'access callback' => 'janrain_capture_token_expired_access',
    'access arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'includes/janrain_capture.endpoints.inc',
  );
  $janrain_capture_ver = variable_get('janrain_capture_ver', JANRAIN_CAPTURE_VERSION_DEFAULT);
  $ver = !empty($janrain_capture_ver) ? $janrain_capture_ver : JANRAIN_CAPTURE_VERSION_LEGACY;
  $ver = substr($ver, 0, 1);
  if ($ver == "1") {
    $ver = '';
  }

  // Create a no frills logout URL if SSO is enabled.
  $janrain_settings = $janrain_capture_ver == JANRAIN_CAPTURE_VERSION_LEGACY ? variable_get('janrain_capture_optional', array()) : variable_get('janrain_capture_federate2', array());
  if ($janrain_capture_ver == JANRAIN_CAPTURE_VERSION_LEGACY && !empty($janrain_settings['capture_sso_address']) || isset($janrain_settings['capture_sso_enabled'])) {
    $items['janrain_capture/simple_logout'] = array(
      'title' => t('Plain logout page'),
      'page callback' => 'janrain_capture_simple_logout_page',
      'access callback' => 'user_is_logged_in',
      'type' => MENU_CALLBACK,
      'file' => 'includes/janrain_capture.endpoints.inc',
    );
  }
  return $items;
}