mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-17 20:17:03 +02:00
bugfix: OIDCConfig based providers are not respecting flags and configs (#2299)
* add full support for all oidc config based providers to use and respect all configs set via OIDCConfig * add changelog entry --------- Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
This commit is contained in:
+4
-4
@@ -31,7 +31,7 @@ type GitLabProvider struct {
|
||||
var _ Provider = (*GitLabProvider)(nil)
|
||||
|
||||
// NewGitLabProvider initiates a new GitLabProvider
|
||||
func NewGitLabProvider(p *ProviderData, opts options.GitLabOptions) (*GitLabProvider, error) {
|
||||
func NewGitLabProvider(p *ProviderData, opts options.Provider) (*GitLabProvider, error) {
|
||||
p.setProviderDefaults(providerDefaults{
|
||||
name: gitlabProviderName,
|
||||
})
|
||||
@@ -40,15 +40,15 @@ func NewGitLabProvider(p *ProviderData, opts options.GitLabOptions) (*GitLabProv
|
||||
p.Scope = gitlabDefaultScope
|
||||
}
|
||||
|
||||
oidcProvider := NewOIDCProvider(p, options.OIDCOptions{InsecureSkipNonce: false})
|
||||
oidcProvider := NewOIDCProvider(p, opts.OIDCConfig)
|
||||
|
||||
provider := &GitLabProvider{
|
||||
OIDCProvider: oidcProvider,
|
||||
oidcRefreshFunc: oidcProvider.RefreshSession,
|
||||
}
|
||||
provider.setAllowedGroups(opts.Group)
|
||||
provider.setAllowedGroups(opts.GitLabConfig.Group)
|
||||
|
||||
if err := provider.setAllowedProjects(opts.Projects); err != nil {
|
||||
if err := provider.setAllowedProjects(opts.GitLabConfig.Projects); err != nil {
|
||||
return nil, fmt.Errorf("could not configure allowed projects: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user