mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-09 15:44:10 +00:00
Form paths correctly when the path arg is empty in supervisor_discovery_test.go
This commit is contained in:
@@ -339,10 +339,16 @@ func temporarilyRemoveAllOIDCProviderConfigsAndDefaultTLSCertSecret(ctx context.
|
||||
}
|
||||
|
||||
func jwksURLForIssuer(scheme, host, path string) string {
|
||||
if path == "" {
|
||||
return fmt.Sprintf("%s://%s/jwks.json", scheme, host)
|
||||
}
|
||||
return fmt.Sprintf("%s://%s/%s/jwks.json", scheme, host, strings.TrimPrefix(path, "/"))
|
||||
}
|
||||
|
||||
func wellKnownURLForIssuer(scheme, host, path string) string {
|
||||
if path == "" {
|
||||
return fmt.Sprintf("%s://%s/.well-known/openid-configuration", scheme, host)
|
||||
}
|
||||
return fmt.Sprintf("%s://%s/%s/.well-known/openid-configuration", scheme, host, strings.TrimPrefix(path, "/"))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user