keep eap state when refreshing

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-16 22:59:16 +02:00
parent 50c50c4109
commit 8cf8f1e199
3 changed files with 16 additions and 17 deletions

View File

@ -35,14 +35,14 @@ type RadiusServer struct {
ac *ak.APIController
cryptoStore *ak.CryptoStore
providers []*ProviderInstance
providers map[int32]*ProviderInstance
}
func NewServer(ac *ak.APIController) ak.Outpost {
rs := &RadiusServer{
log: log.WithField("logger", "authentik.outpost.radius"),
ac: ac,
providers: []*ProviderInstance{},
providers: map[int32]*ProviderInstance{},
cryptoStore: ak.NewCryptoStore(ac.Client.CryptoApi),
}
rs.s = radius.PacketServer{
@ -103,7 +103,8 @@ func (rs *RadiusServer) Start() error {
}()
go func() {
defer wg.Done()
err := rs.StartRadiusServer()
rs.log.WithField("listen", rs.s.Addr).Info("Starting radius server")
err := rs.s.ListenAndServe()
if err != nil {
panic(err)
}