public function OAuth2HTTPSFetcher::configForm in Feeds OAuth 6
Same name and namespace in other branches
- 7 OAuth2HTTPSFetcher.inc \OAuth2HTTPSFetcher::configForm()
Add form options.
Overrides FeedsHTTPFetcher::configForm
File
- ./
OAuth2HTTPSFetcher.inc, line 87
Class
- OAuth2HTTPSFetcher
- Support OAuth 2.0 authentication.
Code
public function configForm(&$form_state) {
$form = parent::configForm($form_state);
$form['use_pubsubhubbub'] = array(
'#type' => 'value',
'#value' => FALSE,
);
$form['authenticator'] = array(
'#type' => 'select',
'#title' => t('OAuth authenticator'),
'#default_value' => $this->config['authenticator'],
'#options' => module_invoke_all('feeds_oauth_authenticator'),
'#description' => t('Choose the authentication module that provides the needed OAuth tokens.'),
);
$form['site_id'] = array(
'#type' => 'textfield',
'#title' => t('Site identifier'),
'#default_value' => $this->config['site_id'],
'#description' => t('Internal identifier for this connection.'),
'#required' => TRUE,
);
$form['consumer_key'] = array(
'#type' => 'textfield',
'#title' => t('Consumer key'),
'#default_value' => $this->config['consumer_key'],
'#required' => TRUE,
);
$form['consumer_secret'] = array(
'#type' => 'textfield',
'#title' => t('Consumer secret'),
'#default_value' => $this->config['consumer_secret'],
'#required' => TRUE,
);
$form['access_token_url'] = array(
'#type' => 'textfield',
'#title' => t('Access token URL'),
'#default_value' => $this->config['access_token_url'],
'#required' => TRUE,
);
$form['authorize_url'] = array(
'#type' => 'textfield',
'#title' => t('Authorize URL'),
'#default_value' => $this->config['authorize_url'],
'#required' => TRUE,
);
$form['scope'] = array(
'#type' => 'textarea',
'#title' => t('Scope'),
'#description' => t('Scope of the authorization request, one per line or comma-separated.'),
'#default_value' => $this->config['scope'],
);
return $form;
}