Fix uninitialized user claim

This commit is contained in:
Leandro Lafin 2024-07-10 17:41:52 -03:00
parent be68c55542
commit 05b688e088
No known key found for this signature in database
GPG Key ID: 60C427B9DF40CB72
4 changed files with 10 additions and 3 deletions

View File

@ -8,6 +8,7 @@
## Changes since v7.4.0
- [#1873](https://github.com/oauth2-proxy/oauth2-proxy/pull/1873) Fix empty users with some OIDC providers (@babs)
- [#1882](https://github.com/oauth2-proxy/oauth2-proxy/pull/1882) Make `htpasswd.GetUsers` racecondition safe
- [#1883](https://github.com/oauth2-proxy/oauth2-proxy/pull/1883) Ensure v8 manifest variant is set on docker images

View File

@ -32,7 +32,9 @@ var _ Provider = (*GitLabProvider)(nil)
// NewGitLabProvider initiates a new GitLabProvider
func NewGitLabProvider(p *ProviderData, opts options.GitLabOptions) (*GitLabProvider, error) {
p.ProviderName = gitlabProviderName
p.setProviderDefaults(providerDefaults{
name: gitlabProviderName,
})
if p.Scope == "" {
p.Scope = gitlabDefaultScope
}

View File

@ -17,7 +17,9 @@ type KeycloakOIDCProvider struct {
// NewKeycloakOIDCProvider makes a KeycloakOIDCProvider using the ProviderData
func NewKeycloakOIDCProvider(p *ProviderData, opts options.KeycloakOptions) *KeycloakOIDCProvider {
p.ProviderName = keycloakOIDCProviderName
p.setProviderDefaults(providerDefaults{
name: keycloakOIDCProviderName,
})
provider := &KeycloakOIDCProvider{
OIDCProvider: &OIDCProvider{

View File

@ -21,7 +21,9 @@ const nextCloudProviderName = "Nextcloud"
// NewNextcloudProvider initiates a new NextcloudProvider
func NewNextcloudProvider(p *ProviderData) *NextcloudProvider {
p.ProviderName = nextCloudProviderName
p.setProviderDefaults(providerDefaults{
name: nextCloudProviderName,
})
p.getAuthorizationHeaderFunc = makeOIDCHeader
if p.EmailClaim == options.OIDCEmailClaim {
// This implies the email claim has not been overridden, we should set a default