Skip to content
Snippets Groups Projects
Unverified Commit 5260ddd6 authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch Committed by Mateu Aguiló Bosch
Browse files

Issue #3068677 by e0ipso: Make the label generic in the auth token config

parent 4e85abf6
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@
namespace Drupal\api_proxy\Controller;
use Drupal\api_proxy\Plugin\HttpApiInterface;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Cache\CacheableResponse;
use Drupal\Core\Controller\ControllerBase;
......
<?php
namespace Drupal\api_proxy\Plugin\api_proxy;
trait HttpApiCommonConfigs {
protected function authTokenConfigForm(array $configuration): array {
......@@ -11,8 +9,11 @@ trait HttpApiCommonConfigs {
'#type' => 'item',
'#title' => $this->t('Authentication token (%status)', ['%status' => empty($configuration['auth_token']) ? $this->t('Not set') : $this->t('Successfully set')]),
'#description' => $this->t(
'The authentication token to access the G2 API. <strong>IMPORTANT:</strong> do not export configuration to the repository with sensitive data, instead set <code>$config[\'api_proxy.settings\'][\'api_proxies\'][\'@id\'][\'auth_token\'] = \'YOUR-TOKEN\';</code> in your <code>settings.local.php</code> (or similar) to store your secret.',
['@id' => $this->getPluginId()]
'The authentication token to access the %label proxy. <strong>IMPORTANT:</strong> do not export configuration to the repository with sensitive data, instead set <code>$config[\'api_proxy.settings\'][\'api_proxies\'][\'@id\'][\'auth_token\'] = \'YOUR-TOKEN\';</code> in your <code>settings.local.php</code> (or similar) to store your secret.',
[
'%label'=> $this->getPluginDefinition()['label'],
'@id' => $this->getPluginId(),
]
),
];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment