HTTP-POST Binding
This is an API breaking release.
It adds SP support for generating a HTTP-POST binding AuthnRequest.
Eg;
serviceProvider := &saml.ServiceProvider{}
// Parse IdP metadata
//
// from URL
serviceProvider.IdPMetadataURL = "http://idp.example.com/metadata.xml"
// or from XML file
serviceProvider.IdPMetadataXML = []byte("<xml>")
idpMetadata, _ := serviceProvider.ParseIdPMetadata()
// Get SSOService element for the selected binding
//
ssoService := idpMetadata.SSOService(saml.HTTPPostBinding)
serviceProvider.IdPSSOServiceBinding = ssoService.Binding
serviceProvider.IdPSSOServiceURL = ssoService.Location
// or set information from a different source
serviceProvider.IdPSSOServiceBinding = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST",
serviceProvider.IdPSSOServiceURL = "https://idp.example.com/sso",
// Generate SAML Response for HTTP-POST binding
samlReq, _ := serviceProvider.NewPostSAMLRequest()
Removes ServeSSO
handler wrapper and introduces an explicit function to generate a SAML Response for a given AuthnRequest.
Removes http.Request
dependency from IdPAuthnRequest
Makes IdP metadata parsing explicit