mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 22:41:04 +02:00
Remove provider configuration from validation package
This commit is contained in:
@@ -3,6 +3,7 @@ package validation
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
|
||||
)
|
||||
@@ -77,7 +78,10 @@ func validateGoogleConfig(provider options.Provider) []string {
|
||||
}
|
||||
if provider.GoogleConfig.ServiceAccountJSON == "" {
|
||||
msgs = append(msgs, "missing setting: google-service-account-json")
|
||||
} else if _, err := os.Stat(provider.GoogleConfig.ServiceAccountJSON); err != nil {
|
||||
msgs = append(msgs, fmt.Sprintf("invalid Google credentials file: %s", provider.GoogleConfig.ServiceAccountJSON))
|
||||
}
|
||||
}
|
||||
|
||||
return msgs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user