package discourse import "github.com/google/uuid" type ApiConfig struct { Endpoint string ApiKey string ApiUser string } type SsoConfig struct { Endpoint string ReturnEndpoint string Secret string Uuid uuid.UUID } func GetSSORequestURL(config SsoConfig) string { url := generateSSORequestURL(config) return url } // ValidateSsoResponse - Validate the signature on the sso response func ValidateSsoResponse(sso, sig, secret string) bool { ssoDataSig := computeHmac256(sso, secret) return sig == ssoDataSig }