mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 10:38:41 -04:00
[PR #568] [MERGED] Gandi Personal Access Token support #733
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/qdm12/ddns-updater/pull/568
Author: @varner-owl
Created: 12/10/2023
Status: ✅ Merged
Merged: 1/14/2024
Merged by: @qdm12
Base:
master← Head:add-gandi-bearer-token📝 Commits (3)
bb24a16Add PAT authenticationebc5140Correct keynotset error message69d678cCode review by @qdm12📊 Changes
2 files changed (+27 additions, -14 deletions)
View changed files
📝
docs/gandi.md(+3 -3)📝
internal/provider/providers/gandi/provider.go(+24 -11)📄 Description
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:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.