You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
608 B
30 lines
608 B
package azcredentials
|
|
|
|
const (
|
|
AzureAuthManagedIdentity = "msi"
|
|
AzureAuthClientSecret = "clientsecret"
|
|
)
|
|
|
|
type AzureCredentials interface {
|
|
AzureAuthType() string
|
|
}
|
|
|
|
type AzureManagedIdentityCredentials struct {
|
|
ClientId string
|
|
}
|
|
|
|
type AzureClientSecretCredentials struct {
|
|
AzureCloud string
|
|
Authority string
|
|
TenantId string
|
|
ClientId string
|
|
ClientSecret string
|
|
}
|
|
|
|
func (credentials *AzureManagedIdentityCredentials) AzureAuthType() string {
|
|
return AzureAuthManagedIdentity
|
|
}
|
|
|
|
func (credentials *AzureClientSecretCredentials) AzureAuthType() string {
|
|
return AzureAuthClientSecret
|
|
}
|
|
|