func TestMustGetSamlClient_Onelogin(t *testing.T) {
	s := oneloginMock
	qs := url.Values{}
	qs.Add("token", base64.URLEncoding.EncodeToString([]byte("mockClientId:mockClientSecret")))
	t.Run("public url", func(t *testing.T) {
		t.Skip("can not test against Onelogin public URL without valid API credentials")  
	})
	t.Run("custom url", func(t *testing.T) {
		u := fmt.Sprintf("%s/%s?%s", s.URL, oneloginProvider, qs.Encode())
		MustGetSamlClient("", u, AuthenticationClientConfig{})
	})
	t.Run("bad", func(t *testing.T) {
		defer func() {
			if x := recover(); x == nil {
				t.Errorf("Did not receive expected panic calling %s MustGetSamlClient", oneloginProvider)
			}
		}()
		MustGetSamlClient("", "https://test.onelogin.com", AuthenticationClientConfig{})
	})
}
The Onelogin client requires access to a Onelogin endpoint to get an API access token
use the mock endpoint in the onelogin_client_test file for testing.
package external
import (
	"encoding/base64"
	"fmt"
	"net/http"
	"net/http/httptest"
	"net/url"
	"strings"
	"testing"
)
var mockExternalProvider = httptest.NewServer(http.HandlerFunc(mockExternalHandler))
func TestMustGetSamlClient(t *testing.T) {
	t.Run("unknown", func(t *testing.T) {
		defer func() {
			if x := recover(); x == nil {
				t.Errorf("Did not receive expected panic calling %s MustGetSamlClient", unknownProvider)
			}
		}()
		u := fmt.Sprintf("%s/%s", mockExternalProvider.URL, "this_should_fail")
		MustGetSamlClient("", u, AuthenticationClientConfig{})
	})
	t.Run("explicit provider", func(t *testing.T) {
		MustGetSamlClient(oktaProvider, "http://test.okta.com", AuthenticationClientConfig{})
	})
}
func TestMustGetSamlClient_Okta(t *testing.T) {
	t.Run("public url", func(t *testing.T) {
		MustGetSamlClient("", "http://test.okta.com", AuthenticationClientConfig{})
	})
	t.Run("custom url", func(t *testing.T) {
		u := fmt.Sprintf("%s/%s", mockExternalProvider.URL, oktaProvider)
		MustGetSamlClient("", u, AuthenticationClientConfig{})
	})
	t.Run("bad", func(t *testing.T) {
		defer func() {
			if x := recover(); x == nil {
				t.Errorf("Did not receive expected panic calling %s MustGetSamlClient", oktaProvider)
			}
		}()
		MustGetSamlClient("", "telnet://test.okta.com", AuthenticationClientConfig{})
	})
}