specProfAuthnRequest returns an IdpAuthnRequest for an AuthnRequest from test.SP with the given extra XML attributes on the AuthnRequest element.
(test *IdentityProviderTest, attrs string)
| 67 | // specProfAuthnRequest returns an IdpAuthnRequest for an AuthnRequest from |
| 68 | // test.SP with the given extra XML attributes on the AuthnRequest element. |
| 69 | func specProfAuthnRequest(test *IdentityProviderTest, attrs string) *IdpAuthnRequest { |
| 70 | req := &IdpAuthnRequest{ |
| 71 | Now: TimeNow(), |
| 72 | IDP: &test.IDP, |
| 73 | RequestBuffer: []byte(`<AuthnRequest xmlns="urn:oasis:names:tc:SAML:2.0:protocol" ` + |
| 74 | `ID="id-specprof-request" IssueInstant="2015-12-01T01:57:09Z" Version="2.0" ` + attrs + `>` + |
| 75 | `<Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">` + test.SP.MetadataURL.String() + `</Issuer>` + |
| 76 | `</AuthnRequest>`), |
| 77 | } |
| 78 | req.HTTPRequest = httptest.NewRequest(http.MethodPost, test.IDP.SSOURL.String(), nil) |
| 79 | return req |
| 80 | } |
| 81 | |
| 82 | // specProfServeSPMetadata makes the IdP of test see md as the metadata of |
| 83 | // test.SP. |
no test coverage detected