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).
| Comment | File | Size | Author |
|---|---|---|---|
| auto_alter-add_key_support.patch | 10.95 KB | bgilhome |
Issue fork auto_alter-3305591
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:
- master
changes, plain diff MR !3
- 3305591-add-key-support
changes, plain diff MR !2
Comments
Comment #4
slowflyer commentedHi,
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.
Comment #5
bgilhome commentedHi @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().
Comment #7
slowflyer commentedJust created a new version 2.0.x-dev supporting the key module
Comment #8
slowflyer commentedComment #9
slowflyer commented