func (auth *AuthManager) GetProvider(name string) authentication.AuthProvider {
	for _, provider := range auth.providers {
		if provider.GetName() == name {
			return provider
		}
	}
	return nil
}
GetProvider get provider by name
package server
import (
	"sort"
	"github.com/gin-gonic/gin"
	"github.com/h44z/wg-portal/internal/authentication"
	"github.com/h44z/wg-portal/internal/users"
	"github.com/sirupsen/logrus"
)
type AuthManager struct {
	Server      *Server
	Group       *gin.RouterGroup  
	providers   []authentication.AuthProvider
	UserManager *users.Manager
}
func (auth *AuthManager) RegisterProvider(provider authentication.AuthProvider) {
	name := provider.GetName()
	if auth.GetProvider(name) != nil {
		logrus.Warnf("auth provider %v already registered", name)
	}
	provider.SetupRoutes(auth.Group)
	auth.providers = append(auth.providers, provider)
}
func (auth *AuthManager) RegisterProviderWithoutError(provider authentication.AuthProvider, err error) {
	if err != nil {
		logrus.Errorf("skipping provider registration: %v", err)
		return
	}
	auth.RegisterProvider(provider)
}