Skip to content

add possibility to configure http client for oidc provider#1

Merged
ostempel merged 4 commits intomasterfrom
add-possibility-to-configure-http-client
Dec 10, 2025
Merged

add possibility to configure http client for oidc provider#1
ostempel merged 4 commits intomasterfrom
add-possibility-to-configure-http-client

Conversation

@ostempel
Copy link
Copy Markdown
Collaborator

@ostempel ostempel commented Nov 5, 2025

Description

For our mini-lab we need the possibility to skip tls verification. Therefore we need to manipulate the http-transporter of the oidc-provider. Otherwise it will fail because of unknown CA and self-signed certs.

The http-client of the provider gets accessed through:

func (p *Provider) Client() *http.Client {
return goth.HTTPClientWithFallBack(p.HTTPClient)
}

And the Provider wraps this with the DefaultClient if it is not set.

goth/provider.go

Lines 82 to 87 in 15b24f5

func HTTPClientWithFallBack(h *http.Client) *http.Client {
if h != nil {
return h
}
return http.DefaultClient
}

@ostempel ostempel requested a review from majst01 November 5, 2025 12:27
@metal-robot metal-robot bot added this to Development Nov 5, 2025
@ostempel ostempel requested a review from majst01 November 5, 2025 13:00
@ostempel ostempel requested a review from majst01 December 5, 2025 10:37
@ostempel ostempel merged commit 6c62abc into master Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants