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

Method parseResponseHTTP

service_provider.go:653–669  ·  view source on GitHub ↗
(req *http.Request, possibleRequestIDs []string)

Source from the content-addressed store, hash-verified

651}
652
653func (sp *ServiceProvider) parseResponseHTTP(req *http.Request, possibleRequestIDs []string) (*Assertion, error) {
654 retErr := &InvalidResponseError{
655 Now: TimeNow(),
656 }
657
658 rawResponseBuf, err := base64.StdEncoding.DecodeString(req.PostForm.Get("SAMLResponse"))
659 if err != nil {
660 retErr.PrivateErr = fmt.Errorf("cannot parse base64: %s", err)
661 return nil, retErr
662 }
663
664 assertion, err := sp.ParseXMLResponse(rawResponseBuf, possibleRequestIDs)
665 if err != nil {
666 return nil, err
667 }
668 return assertion, nil
669}
670
671// ParseXMLArtifactResponse validates the SAML Artifact resolver response
672// and returns the verified assertion.

Callers 1

ParseResponseMethod · 0.95

Calls 2

ParseXMLResponseMethod · 0.95
GetMethod · 0.65

Tested by

no test coverage detected