FetchSignedMetadata fetches metadata from metadataURL and parses it with ParseSignedMetadata: its root element must carry a valid signature made with one of certs.
(ctx context.Context, httpClient *http.Client, metadataURL url.URL, certs []*x509.Certificate)
| 285 | // ParseSignedMetadata: its root element must carry a valid signature made |
| 286 | // with one of certs. |
| 287 | func FetchSignedMetadata(ctx context.Context, httpClient *http.Client, metadataURL url.URL, certs []*x509.Certificate) (*saml.EntityDescriptor, error) { |
| 288 | data, err := fetchMetadataBytes(ctx, httpClient, metadataURL) |
| 289 | if err != nil { |
| 290 | return nil, err |
| 291 | } |
| 292 | return ParseSignedMetadata(data, certs) |
| 293 | } |
| 294 | |
| 295 | // FetchSignedMetadataByEntityID fetches metadata from metadataURL and parses |
| 296 | // it with ParseSignedMetadataByEntityID. |