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

Function specCoreSignedResponse

spec_core_assertions_test.go:26–37  ·  view source on GitHub ↗

specCoreSignedResponse returns a Response signed by the IDP that carries a (plaintext, unsigned) assertion. mutate, if set, edits the Assertion element before the Response is signed.

(t *testing.T, e *spcovEnv, a *Assertion, mutate func(assertionEl *etree.Element))

Source from the content-addressed store, hash-verified

24// (plaintext, unsigned) assertion. mutate, if set, edits the Assertion
25// element before the Response is signed.
26func specCoreSignedResponse(t *testing.T, e *spcovEnv, a *Assertion, mutate func(assertionEl *etree.Element)) []byte {
27 t.Helper()
28 r := e.response()
29 r.Assertion = a
30 el := r.Element()
31 if mutate != nil {
32 assertionEl := el.FindElement("./Assertion")
33 assert.Assert(t, assertionEl != nil)
34 mutate(assertionEl)
35 }
36 return spcovSerialize(t, e.idpSign(t, el))
37}
38
39// specCoreIDPRequest returns a validated IdpAuthnRequest from
40// NewIdentityProviderTest, issued at 2015-12-01T01:57:09Z. It restores the globals

Calls 4

spcovSerializeFunction · 0.85
responseMethod · 0.80
idpSignMethod · 0.80
ElementMethod · 0.45

Tested by

no test coverage detected