From ff2176f82cc4687094b40fba820fdda6c47aa58f Mon Sep 17 00:00:00 2001 From: sshahcodes Date: Thu, 22 Feb 2024 14:23:44 -0500 Subject: [PATCH] remove unused GenerateIdPServiceProviderFromFields func --- lib/services/saml_idp_service_provider.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/services/saml_idp_service_provider.go b/lib/services/saml_idp_service_provider.go index 5a7fb1aba1dc1..e69b8eb8c3a8b 100644 --- a/lib/services/saml_idp_service_provider.go +++ b/lib/services/saml_idp_service_provider.go @@ -106,24 +106,6 @@ func UnmarshalSAMLIdPServiceProvider(data []byte, opts ...MarshalOption) (types. return nil, trace.BadParameter("unsupported SAML IdP service provider resource version %q", h.Version) } -// GenerateIdPServiceProviderFromFields takes `name` and `entityDescriptor` fields and returns a SAMLIdPServiceProvider. -func GenerateIdPServiceProviderFromFields(name string, entityDescriptor string) (types.SAMLIdPServiceProvider, error) { - if len(name) == 0 { - return nil, trace.BadParameter("missing name") - } - if len(entityDescriptor) == 0 { - return nil, trace.BadParameter("missing entity descriptor") - } - - var s types.SAMLIdPServiceProviderV1 - s.SetName(name) - s.SetEntityDescriptor(entityDescriptor) - if err := s.CheckAndSetDefaults(); err != nil { - return nil, trace.Wrap(err) - } - return &s, nil -} - // supportedACSBindings is the set of AssertionConsumerService bindings that teleport supports. var supportedACSBindings = map[string]struct{}{ saml.HTTPPostBinding: {},