ok this works kinda

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-16 15:16:26 +02:00
parent 318443f270
commit 91c87b7c3c
8 changed files with 91 additions and 51 deletions

View File

@ -1,10 +1,14 @@
package eap
import "slices"
import (
"slices"
"goauthentik.io/internal/outpost/radius/eap/protocol"
)
type Settings struct {
ProtocolsToOffer []Type
ProtocolSettings map[Type]interface{}
ProtocolsToOffer []protocol.Type
ProtocolSettings map[protocol.Type]interface{}
}
type StateManager interface {
@ -14,13 +18,13 @@ type StateManager interface {
}
type State struct {
ChallengesToOffer []Type
TypeState map[Type]any
ChallengesToOffer []protocol.Type
TypeState map[protocol.Type]any
}
func BlankState(settings Settings) *State {
return &State{
ChallengesToOffer: slices.Clone(settings.ProtocolsToOffer),
TypeState: map[Type]any{},
TypeState: map[protocol.Type]any{},
}
}