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

Function FetchSignedMetadata

samlsp/fetch_metadata.go:287–293  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

285// ParseSignedMetadata: its root element must carry a valid signature made
286// with one of certs.
287func 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.

Callers 2

mainFunction · 0.92
TestFetchSignedMetadataFunction · 0.85

Calls 2

fetchMetadataBytesFunction · 0.85
ParseSignedMetadataFunction · 0.85

Tested by 1

TestFetchSignedMetadataFunction · 0.68