You are here

function farm_api_farm_api_oauth2_client in farmOS 7

File

modules/farm/farm_api/farm_api.module, line 75
Farm API module.

Code

function farm_api_farm_api_oauth2_client() {
  $clients = array();

  // Provide default farmOS OAuth Client for general use.
  $clients['farm'] = array(
    'label' => 'farmOS (Default)',
    'client_key' => 'farm',
    'redirect_uri' => '',
    'settings' => array(
      'override_grant_types' => TRUE,
      'allow_implicit' => FALSE,
      'grant_types' => array(
        'password' => 'password',
        'refresh_token' => 'refresh_token',
      ),
      'always_issue_new_refresh_token' => TRUE,
      'unset_refresh_token_after_use' => TRUE,
    ),
  );
  return $clients;
}