Commit 36bd693d authored by Yifan Gu's avatar Yifan Gu

oidc: Remove tailing slash before fetching the provider config.

parent b5c12d10
...@@ -23,6 +23,7 @@ import ( ...@@ -23,6 +23,7 @@ import (
"fmt" "fmt"
"net/http" "net/http"
"net/url" "net/url"
"strings"
"time" "time"
"github.com/coreos/go-oidc/jose" "github.com/coreos/go-oidc/jose"
...@@ -87,7 +88,7 @@ func New(issuerURL, clientID, caFile, usernameClaim string) (*OIDCAuthenticator, ...@@ -87,7 +88,7 @@ func New(issuerURL, clientID, caFile, usernameClaim string) (*OIDCAuthenticator,
return nil, fmt.Errorf("failed to fetch provider config after %v retries", maxRetries) return nil, fmt.Errorf("failed to fetch provider config after %v retries", maxRetries)
} }
cfg, err = oidc.FetchProviderConfig(hc, issuerURL) cfg, err = oidc.FetchProviderConfig(hc, strings.TrimSuffix(issuerURL, "/"))
if err == nil { if err == nil {
break break
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment