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

Method GetServiceProvider

samlidp/service.go:28–36  ·  view source on GitHub ↗

GetServiceProvider returns the Service Provider metadata for the service provider ID, which is typically the service provider's metadata URL. If an appropriate service provider cannot be found then the returned error must be os.ErrNotExist.

(r *http.Request, serviceProviderID string)

Source from the content-addressed store, hash-verified

26// metadata URL. If an appropriate service provider cannot be found then
27// the returned error must be os.ErrNotExist.
28func (s *Server) GetServiceProvider(r *http.Request, serviceProviderID string) (*saml.EntityDescriptor, error) {
29 s.idpConfigMu.RLock()
30 defer s.idpConfigMu.RUnlock()
31 rv, ok := s.serviceProviders[serviceProviderID]
32 if !ok {
33 return nil, os.ErrNotExist
34 }
35 return rv, nil
36}
37
38// HandleListServices handles the `GET /services/` request and responds with a JSON formatted list
39// of service names.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected