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

Function idpcovRequest

idp_coverage_test.go:94–108  ·  view source on GitHub ↗

idpcovRequest returns a request ready for MakeAssertion / MakeAssertionEl / MakeResponse, without going through Validate.

(t *testing.T, test *IdentityProviderTest)

Source from the content-addressed store, hash-verified

92// idpcovRequest returns a request ready for MakeAssertion / MakeAssertionEl /
93// MakeResponse, without going through Validate.
94func idpcovRequest(t *testing.T, test *IdentityProviderTest) *IdpAuthnRequest {
95 t.Helper()
96 r, err := http.NewRequest("POST", "https://idp.example.com/saml/sso", nil)
97 assert.NilError(t, err)
98 r.RemoteAddr = "192.0.2.1"
99 return &IdpAuthnRequest{
100 IDP: &test.IDP,
101 HTTPRequest: r,
102 Now: TimeNow(),
103 Request: AuthnRequest{ID: "id-123", IssueInstant: TimeNow()},
104 ServiceProviderMetadata: &EntityDescriptor{EntityID: "https://sp.example.com/saml2/metadata"},
105 SPSSODescriptor: &SPSSODescriptor{},
106 ACSEndpoint: &IndexedEndpoint{Binding: HTTPPostBinding, Location: "https://sp.example.com/saml2/acs"},
107 }
108}
109
110func idpcovCertKeyDescriptor(use string, data string) KeyDescriptor {
111 return KeyDescriptor{

Calls

no outgoing calls

Tested by

no test coverage detected