Problem/Motivation

It would be good to support the Key module so API key doesn't have to be tracked in code.

Proposed resolution

Attached patch adds (optional) support for storing the API key in a key defined by the Key module (similar to patch provided in Cloudflare issue - https://www.drupal.org/project/cloudflare/issues/2850985).

Data model changes

Settings schema has changed - I've added files in config/install & config/schema (were missing).

CommentFileSizeAuthor
auto_alter-add_key_support.patch10.95 KBbgilhome

Issue fork auto_alter-3305591

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bgilhome created an issue. See original summary.

slowflyer made their first commit to this issue’s fork.

slowflyer’s picture

Hi,

thanks for the patch.
After install I get the error: ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in Composer\Autoload\includeFile() (line 45 of modules/contrib/auto_alter/src/AutoAlterCredentials.php).

and it does not checked the dependency on the key module.

bgilhome’s picture

Hi @slowflyer, thanks for setting up the fork. I've added commits to remove the '|' from the credentials helper, to check for the Key module, to use #states in the settings form instead of ajax, and use the helper in the hook_requirements().

slowflyer’s picture

Just created a new version 2.0.x-dev supporting the key module

slowflyer’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
slowflyer’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.