Skip to content

Conversation

@ostempel
Copy link

@ostempel ostempel commented Nov 6, 2025

Description

This pull request refactors the initialization logic for the OpenID Connect provider in providers/openidConnect/openidConnect.go to reduce code duplication and improve maintainability. The changes introduce a shared helper function for default provider setup and add a new constructor for custom HTTP clients (e.g.: in our development lab we need to skip the TLS verification of our self-sigend certs).

Provider initialization refactor:

  • Introduced a new helper function newBaseProvider to centralize default Provider initialization logic, reducing code duplication across constructors (NewNamed, NewCustomisedURL, etc.).

Constructor enhancements:

  • Updated NewNamed and NewCustomisedURL to use newBaseProvider, simplifying their code and ensuring consistent initialization.

New constructor:

  • Added new constructor: NewCustomisedHttpClient for custom http-clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant