You are here

function _oauth_common_admin in OAuth 1.0 7.3

Same name and namespace in other branches
  1. 6.3 oauth_common.admin.inc \_oauth_common_admin()
  2. 7.4 oauth_common.admin.inc \_oauth_common_admin()

@file Administration pages for OAuth module.

1 string reference to '_oauth_common_admin'
oauth_common_menu in ./oauth_common.module
Implements hook_menu().

File

./oauth_common.admin.inc, line 7
Administration pages for OAuth module.

Code

function _oauth_common_admin() {
  $form = array();
  $form['oauth_common_enable_provider'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable the oauth provider'),
    '#default_value' => variable_get('oauth_common_enable_provider', TRUE),
    '#description' => t('This option controls whether this site should act as a OAuth provider or not'),
  );
  $form['oauth_common_request_token_lifetime'] = array(
    '#type' => 'textfield',
    '#title' => t('Request token lifetime (in seconds)'),
    '#default_value' => variable_get('oauth_common_request_token_lifetime', 7200),
  );
  $form['oauth_common_login_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Login page'),
    '#description' => t('Specify an alternative login page. This is useful when, for example, you want to show a mobile-enhanced login page.'),
    '#default_value' => variable_get('oauth_common_login_path', OAUTH_COMMON_LOGIN_PATH),
  );
  $form['#validate'][] = '_oauth_common_admin_settings_validate';
  return system_settings_form($form);
}