Repository navigation
Gandi Personal Access Token support - #568
Conversation
|
Hello, |
- Change `token` -> `personal_access_token` - Remove `key` from documentation although it still works - Minor code changes and comment simplifications
By "deprecated", it should still work right? It's just that the PAT is now the preferred method right? Notable changes I did:
EDIT: Also very sorry for the big delay reviewing this, I've been swamped with life and other repositories, I didn't have time to get back to this repository. |
It was also my understanding that PAT is just the preferred method now. Although I stopped using the API key last month, I just checked again and the API keys still work and Gandi has not updated their documentation to say anything about the removal of API keys. Either way, thanks for merging it and for all the work you do on all these repositories! |
Currently authentication for updates to Gandi domains can only be done with the Gandi API key. Gandi has depreciated the API key in favor of Personal Access Tokens.
This PR adds the option to authenticate using a Personal Access Tokens but does not require a token to be used instead of an API key. This should not break anyone's current configurations or require updates to their configuration files. This implementation produces a KeyNotSet error only if both the API Key and Personal Access Token are not provided or are empty the config file. If both an API key and Personal Access Token are provided, it will default to using the Token for authentication. It does not use the API key as a fall back (i.e. if authentication via Token fails, try again with the API key), but this could be implemented in the future if desired.
Example config.json with different possible valid configurations: