validationErrors=append(validationErrors,fmt.Errorf("authProvider cannot be provided in combination with an exec plugin for %s",authInfoName))
}
iflen(authInfo.Exec.Command)==0{
validationErrors=append(validationErrors,fmt.Errorf("command must be specified for %v to use exec authentication plugin",authInfoName))
}
iflen(authInfo.Exec.APIVersion)==0{
validationErrors=append(validationErrors,fmt.Errorf("apiVersion must be specified for %v to use exec authentication plugin",authInfoName))
}
for_,v:=rangeauthInfo.Exec.Env{
iflen(v.Name)==0{
validationErrors=append(validationErrors,fmt.Errorf("env variable name must be specified for %v to use exec authentication plugin",authInfoName))
}elseiflen(v.Value)==0{
validationErrors=append(validationErrors,fmt.Errorf("env variable %s value must be specified for %v to use exec authentication plugin",v.Name,authInfoName))
}
}
}
// authPath also provides information for the client to identify the server, so allow multiple auth methods in that case
// authPath also provides information for the client to identify the server, so allow multiple auth methods in that case
if(len(methods)>1)&&(!usingAuthPath){
if(len(methods)>1)&&(!usingAuthPath){
validationErrors=append(validationErrors,fmt.Errorf("more than one authentication method found for %v; found %v, only one is allowed",authInfoName,methods))
validationErrors=append(validationErrors,fmt.Errorf("more than one authentication method found for %v; found %v, only one is allowed",authInfoName,methods))