Update default farm client to use authorization_code refresh_token and password grants

This commit is contained in:
Paul Weidner 2023-11-01 10:43:22 -07:00 committed by Michael Stenta
parent c64247b966
commit 49040c5882
2 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,7 @@ function farm_api_post_update_enable_default_consumer_module(&$sandbox = NULL) {
/** @var \Drupal\consumers\Entity\ConsumerInterface $farm_default */
$farm_default = reset($consumers);
$farm_default->set('user_id', NULL);
$farm_default->set('grant_types', ['password']);
$farm_default->set('grant_types', ['authorization_code', 'refresh_token', 'password']);
$farm_default->save();
}

View File

@ -24,6 +24,8 @@ function farm_api_default_consumer_install() {
'client_id' => 'farm',
'access_token_expiration' => 3600,
'grant_types' => [
'authorization_code',
'refresh_token',
'password',
],
'redirect' => $base_url,