You are here

function oauth2_server_services_controller_settings in OAuth2 Server 7

Services authentication "controller_settings" callback.

1 string reference to 'oauth2_server_services_controller_settings'
oauth2_server_services_authentication_info in ./oauth2_server.module
Implements hook_services_authentication().

File

includes/oauth2_server.services_auth.inc, line 84
Provides an authentication method to Services.

Code

function oauth2_server_services_controller_settings($settings, $controller, $endpoint, $class, $name) {
  $form = array();
  $form['require_authentication'] = array(
    '#type' => 'checkbox',
    '#title' => t('Require authentication'),
    '#default_value' => isset($settings['require_authentication']) ? $settings['require_authentication'] : FALSE,
  );
  $form['scope'] = array(
    '#type' => 'textfield',
    '#title' => t('Scope'),
    '#default_value' => isset($settings['scope']) ? $settings['scope'] : '',
    '#description' => t('A space-separated list of required scopes. Leave empty to ignore the check.'),
  );
  return $form;
}