From ca7625600817444ff42c66f44af2c30599772a98 Mon Sep 17 00:00:00 2001 From: Pawel Stefanski Date: Wed, 4 Nov 2020 20:53:52 +0100 Subject: [PATCH] Add path element to authority base url request to enable custom servers As some OAuth providers allows to create custom OAuth server instances on the same hostname with application id in url path we should allow to discover them and all required endpoints. --- pkg/oidc/discovery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/oidc/discovery.go b/pkg/oidc/discovery.go index efcfe65..fc98e7b 100644 --- a/pkg/oidc/discovery.go +++ b/pkg/oidc/discovery.go @@ -18,7 +18,7 @@ func GetSchemeAndHost(urlString string) (string, error) { return "", err } - return fmt.Sprintf("%s://%s", parsed.Scheme, parsed.Host), nil + return fmt.Sprintf("%s://%s%s", parsed.Scheme, parsed.Host, parsed.Path), nil }