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

Method values

simplesign_binding_test.go:41–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39func strPtr(s string) *string { return &s }
40
41func (m simpleSignMsg) values(t *testing.T) url.Values {
42 t.Helper()
43 v := url.Values{}
44 v.Set(m.param, base64.StdEncoding.EncodeToString(m.xml))
45 content := m.param + "=" + string(m.xml)
46 if m.relayState != nil {
47 v.Set("RelayState", *m.relayState)
48 content += "&RelayState=" + *m.relayState
49 }
50 content += "&SigAlg=" + m.sigAlg
51 v.Set("SigAlg", m.sigAlg)
52 v.Set("Signature", base64.StdEncoding.EncodeToString(redirectSign(t, m.key, m.sigAlg, content)))
53 return v
54}
55
56// simpleSignPost returns a parsed POST request to target carrying v.
57func simpleSignPost(t *testing.T, target string, v url.Values) *http.Request {

Calls 1

redirectSignFunction · 0.85

Tested by

no test coverage detected