mirror of
https://github.com/go-acme/lego
synced 2024-06-02 18:22:12 +02:00
azuredns: Use TenantID also for cli authentication
Users with several tenants should have a way to use a specific one for authentication. Fixes #2178.
This commit is contained in:
parent
983c181e45
commit
b3a32cc286
|
@ -213,7 +213,11 @@ func getCredentials(config *Config) (azcore.TokenCredential, error) {
|
|||
return &timeoutTokenCredential{cred: cred, timeout: config.AuthMSITimeout}, nil
|
||||
|
||||
case "cli":
|
||||
return azidentity.NewAzureCLICredential(nil)
|
||||
var credOptions *azidentity.AzureCLICredentialOptions
|
||||
if config.TenantID != "" {
|
||||
credOptions = &azidentity.AzureCLICredentialOptions{TenantID: config.TenantID}
|
||||
}
|
||||
return azidentity.NewAzureCLICredential(credOptions)
|
||||
|
||||
case "oidc":
|
||||
err := checkOIDCConfig(config)
|
||||
|
|
Loading…
Reference in a new issue