From aaf290193e8a766a05c2bf5d5583969f97505f05 Mon Sep 17 00:00:00 2001 From: Eduardo Vozniak Date: Mon, 2 Oct 2023 10:48:00 -0300 Subject: [PATCH] Removing hardcode --- providers/oidc.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/providers/oidc.go b/providers/oidc.go index 9917b99a..cb626931 100644 --- a/providers/oidc.go +++ b/providers/oidc.go @@ -85,12 +85,12 @@ func (p *OIDCProvider) Redeem(ctx context.Context, redirectURL, code, codeVerifi // such as User, Email, Groups with provider specific API calls. func (p *OIDCProvider) EnrichSession(ctx context.Context, s *sessions.SessionState) error { // ToDo: Vozniak - is this going to break something? tests are fine. - // if p.IntrospectURL.String() != "" { - err := p.enrichFromIntrospectURL(ctx, s) - if err != nil { - logger.Errorf("Warning: Introspect URL request failed: %v", err) + if p != nil && p.IntrospectURL != nil && p.IntrospectURL.String() != "" { + err := p.enrichFromIntrospectURL(ctx, s) + if err != nil { + logger.Errorf("Warning: Introspect URL request failed: %v", err) + } } - // } // If a mandatory email wasn't set, error at this point. if s.Email == "" {