Use app.conf value in getOriginFromHost()

This commit is contained in:
Gucheng Wang
2022-09-03 15:12:26 +08:00
parent af9ae7dbb7
commit 4536fd0636
6 changed files with 13 additions and 29 deletions

View File

@ -70,10 +70,12 @@ func GenerateSamlLoginUrl(id, relayState string) (string, string, error) {
}
func buildSp(provider *Provider, samlResponse string) (*saml2.SAMLServiceProvider, error) {
origin := conf.GetConfigString("origin")
certStore := dsig.MemoryX509CertificateStore{
Roots: []*x509.Certificate{},
}
origin := conf.GetConfigString("origin")
certEncodedData := ""
if samlResponse != "" {
certEncodedData = parseSamlResponse(samlResponse, provider.Type)