func (Provider) GetPriority() int {
	return 1  
}
GetPriority return provider priority
package ldap
import (
	"crypto/tls"
	"strings"
	"github.com/gin-gonic/gin"
	"github.com/go-ldap/ldap/v3"
	"github.com/h44z/wg-portal/internal/authentication"
	ldapconfig "github.com/h44z/wg-portal/internal/ldap"
	"github.com/h44z/wg-portal/internal/users"
	"github.com/pkg/errors"
)
type Provider struct {
	config *ldapconfig.Config
}
func New(cfg *ldapconfig.Config) (*Provider, error) {
	p := &Provider{
		config: cfg,
	}
	client, err := p.open()
	if err != nil {
		return nil, errors.Wrap(err, "unable to open ldap connection")
	}
	defer p.close(client)
	return p, nil
}
func (Provider) GetName() string {
	return string(users.UserSourceLdap)
}
func (Provider) GetType() authentication.AuthProviderType {
	return authentication.AuthProviderTypePassword
}