MCPcopy Create free account
hub / github.com/crewjam/saml / parseSimpleSignResponse

Method parseSimpleSignResponse

service_provider.go:1578–1587  ·  view source on GitHub ↗

parseSimpleSignResponse validates a Response received at the ACS with the HTTP-POST-SimpleSign binding. The SimpleSign signature is checked before anything else. A valid one authenticates the whole Response, as a valid XML signature on the Response element does, so the assertions need no signature o

(m *simpleSignMessage, possibleRequestIDs []string, currentURL url.URL)

Source from the content-addressed store, hash-verified

1576// XML signature on the Response element does, so the assertions need no
1577// signature of their own; everything else is validated as for HTTP-POST.
1578func (sp *ServiceProvider) parseSimpleSignResponse(m *simpleSignMessage, possibleRequestIDs []string, currentURL url.URL) (*Assertion, error) {
1579 if err := sp.verifySimpleSignSignature(m); err != nil {
1580 return nil, &InvalidResponseError{
1581 Now: sp.now(),
1582 Response: string(m.XML),
1583 PrivateErr: err,
1584 }
1585 }
1586 return sp.parseXMLResponse(m.XML, possibleRequestIDs, currentURL, signatureVerifiedByBinding)
1587}
1588
1589// parseXMLResponse is ParseXMLResponse with the signature requirement for
1590// the Response element given by signatureRequirement.

Callers 1

parseResponseHTTPMethod · 0.95

Calls 3

nowMethod · 0.95
parseXMLResponseMethod · 0.95

Tested by

no test coverage detected