From ece3d62d6424209daa39f31f7c8f83a02f3988a9 Mon Sep 17 00:00:00 2001 From: Centzilius Date: Sun, 23 Oct 2022 11:48:20 +0200 Subject: [PATCH] set providerDefaults for oidc consistently (#1828) * set providerDefaults for oidc consistently * docs: document #1828 in CHANGELOG --- CHANGELOG.md | 3 ++- providers/oidc.go | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb38e6..63c0de7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,8 @@ N/A ## Changes since v7.3.0 - +- [#1828](https://github.com/oauth2-proxy/oauth2-proxy/pull/1828) call providerData.setProviderDefaults for oidc provider to achieve consistent behaviour (@centzilius) + - UserClaim will be set to sub instead of beeing empty from now on. - [#1691](https://github.com/oauth2-proxy/oauth2-proxy/pull/1691) Fix Redis IdleTimeout when Redis timeout option is set to non-zero (@dimss) - [#1669](https://github.com/oauth2-proxy/oauth2-proxy/pull/1699) Fix method deprecated error in lint (@t-katsumura) - [#1701](https://github.com/oauth2-proxy/oauth2-proxy/pull/1701) Watch the htpasswd file for changes and update the htpasswdMap (@aiciobanu) diff --git a/providers/oidc.go b/providers/oidc.go index d3902af..aadaf7c 100644 --- a/providers/oidc.go +++ b/providers/oidc.go @@ -22,7 +22,14 @@ type OIDCProvider struct { // NewOIDCProvider initiates a new OIDCProvider func NewOIDCProvider(p *ProviderData, opts options.OIDCOptions) *OIDCProvider { - p.ProviderName = "OpenID Connect" + p.setProviderDefaults(providerDefaults{ + name: "OpenID Connect", + loginURL: nil, + redeemURL: nil, + profileURL: nil, + validateURL: nil, + scope: "", + }) p.getAuthorizationHeaderFunc = makeOIDCHeader return &OIDCProvider{