Skip to content

Commit 0b06a64

Browse files
lszczepaniak-XMŁukasz Szczepaniak
authored andcommitted
add fallback for idpIssuerURL
1 parent e9270e2 commit 0b06a64

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backend/cmd/headlamp.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,12 +876,17 @@ func (c *HeadlampConfig) refreshAndSetToken(oidcAuthConfig *kubeconfig.OidcConfi
876876
tokenType = "access_token"
877877
}
878878

879+
idpIssuerURL := c.oidcIdpIssuerURL
880+
if idpIssuerURL == "" {
881+
idpIssuerURL = oidcAuthConfig.IdpIssuerURL
882+
}
883+
879884
newToken, err := refreshAndCacheNewToken(
880885
oidcAuthConfig,
881886
cache,
882887
tokenType,
883888
token,
884-
c.oidcIdpIssuerURL,
889+
idpIssuerURL,
885890
)
886891
if err != nil {
887892
logger.Log(logger.LevelError, map[string]string{"cluster": cluster},

0 commit comments

Comments
 (0)