Skip to content

Commit

Permalink
Removing hardcode
Browse files Browse the repository at this point in the history
  • Loading branch information
evozniak committed Oct 2, 2023
1 parent cbc7360 commit aaf2901
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions providers/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit aaf2901

Please sign in to comment.