idpcovRequest returns a request ready for MakeAssertion / MakeAssertionEl / MakeResponse, without going through Validate.
(t *testing.T, test *IdentityProviderTest)
| 92 | // idpcovRequest returns a request ready for MakeAssertion / MakeAssertionEl / |
| 93 | // MakeResponse, without going through Validate. |
| 94 | func 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 | |
| 110 | func idpcovCertKeyDescriptor(use string, data string) KeyDescriptor { |
| 111 | return KeyDescriptor{ |
no outgoing calls
no test coverage detected