Harden compliance portal auth and TLS

Align console references and OAuth branding with the
compliance-page model, and fix certificate cache eviction,
portal OAuth handlers, and magic-link edge cases left after
the trust-center rename.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-20 09:59:25 +02:00
parent b03acbd029
commit 43ce3a7c53
51 changed files with 626 additions and 458 deletions

View File

@@ -14,33 +14,15 @@
package visitor
import (
"fmt"
"net/url"
)
const (
BrandLogoPath = "/brand/logo"
BrandDarkLogoPath = "/brand/dark-logo"
)
func BrandLogoURL(portalBaseURL string) (string, error) {
return brandAssetURL(portalBaseURL, BrandLogoPath)
return portalEndpointURL(portalBaseURL, BrandLogoPath)
}
func BrandDarkLogoURL(portalBaseURL string) (string, error) {
return brandAssetURL(portalBaseURL, BrandDarkLogoPath)
}
func brandAssetURL(portalBaseURL string, path string) (string, error) {
parsed, err := url.Parse(portalBaseURL)
if err != nil {
return "", fmt.Errorf("cannot parse portal base URL: %w", err)
}
parsed.Path = path
parsed.RawQuery = ""
parsed.Fragment = ""
return parsed.String(), nil
return portalEndpointURL(portalBaseURL, BrandDarkLogoPath)
}