diff --git a/modules/farm/farm_api/farm_api.module b/modules/farm/farm_api/farm_api.module index 905b1eb5..21fffb14 100644 --- a/modules/farm/farm_api/farm_api.module +++ b/modules/farm/farm_api/farm_api.module @@ -50,6 +50,32 @@ function farm_api_menu() { return $items; } +/* + * Implements hook_farm_api_oauth2_client() + */ +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; +} + /** * Farm info API callback. */