git.iko.soy/typeable/oauth2-proxy
on master help sign in
set providerDefaults for oidc consistently (#1828)

* set providerDefaults for oidc consistently * docs: document #1828 in CHANGELOG

commitece3d62d6424209daa39f31f7c8f83a02f3988a9 authorCentzilius <Centzilius@users.noreply.github.com> dateSun 23 Oct 2022, 11:48 (4 years ago) parentcfcba1a
2 files changed+10−2
CHANGELOG.md+2−1 providers/oidc.go+8−1
CHANGELOG.md+2−1
@@ -18,7 +18,8 @@
1818N/A
1919
2020## Changes since v7.3.0
21−
21+- [#1828](https://github.com/oauth2-proxy/oauth2-proxy/pull/1828) call providerData.setProviderDefaults for oidc provider to achieve consistent behaviour (@centzilius)
22+ - UserClaim will be set to sub instead of beeing empty from now on.
2223- [#1691](https://github.com/oauth2-proxy/oauth2-proxy/pull/1691) Fix Redis IdleTimeout when Redis timeout option is set to non-zero (@dimss)
2324- [#1669](https://github.com/oauth2-proxy/oauth2-proxy/pull/1699) Fix method deprecated error in lint (@t-katsumura)
2425- [#1701](https://github.com/oauth2-proxy/oauth2-proxy/pull/1701) Watch the htpasswd file for changes and update the htpasswdMap (@aiciobanu)
providers/oidc.go+8−1
@@ -22,7 +22,14 @@ type OIDCProvider struct {
2222
2323// NewOIDCProvider initiates a new OIDCProvider
2424func NewOIDCProvider(p *ProviderData, opts options.OIDCOptions) *OIDCProvider {
25− p.ProviderName = "OpenID Connect"
25+ p.setProviderDefaults(providerDefaults{
26+ name: "OpenID Connect",
27+ loginURL: nil,
28+ redeemURL: nil,
29+ profileURL: nil,
30+ validateURL: nil,
31+ scope: "",
32+ })
2633 p.getAuthorizationHeaderFunc = makeOIDCHeader
2734
2835 return &OIDCProvider{