feat(client): OAuth2 Client credential support (#259)

* Initial implementation

* Added OAuth2 support to `client` config

* Revert "Initial implementation"

This reverts commit 7f2f3a603ae018b1cd1c6a282104f44cd9a1a1d1.

* Restore vendored clientcredentials

* configureOAuth2 is now a func (including tests)

* README update

* Use the same OAuth2Config in all related tests

* Cleanup & comments
This commit is contained in:
Andre Bindewald
2022-03-10 02:53:51 +01:00
committed by GitHub
parent fcf046cbe8
commit c4255e65bc
6 changed files with 280 additions and 7 deletions

View File

@ -111,7 +111,10 @@ func (endpoint *Endpoint) ValidateAndSetDefaults() error {
if endpoint.ClientConfig == nil {
endpoint.ClientConfig = client.GetDefaultConfig()
} else {
endpoint.ClientConfig.ValidateAndSetDefaults()
err := endpoint.ClientConfig.ValidateAndSetDefaults()
if err != nil {
return err
}
}
if endpoint.UIConfig == nil {
endpoint.UIConfig = ui.GetDefaultConfig()