oidc: Remove tailing slash before fetching the provider config.

This commit is contained in:
Yifan Gu 2016-02-12 16:40:45 +08:00
parent b5c12d10b8
commit 36bd693d3a

View File

@ -23,6 +23,7 @@ import (
"fmt"
"net/http"
"net/url"
"strings"
"time"
"github.com/coreos/go-oidc/jose"
@ -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)
}
cfg, err = oidc.FetchProviderConfig(hc, issuerURL)
cfg, err = oidc.FetchProviderConfig(hc, strings.TrimSuffix(issuerURL, "/"))
if err == nil {
break
}