Removing hardcode

This commit is contained in:
Eduardo Vozniak 2023-10-02 10:48:00 -03:00
parent cbc7360195
commit aaf290193e
No known key found for this signature in database
GPG Key ID: ACB52F85E23B1C50
1 changed files with 5 additions and 5 deletions

View File

@ -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 == "" {