1234567891011121314151617181920212223 |
- package discourse
- import "github.com/google/uuid"
- 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
- }
|