Files
authentik/internal/outpost/radius/eap/state.go
Jens Langhammer 91c87b7c3c ok this works kinda
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
2025-07-01 22:42:58 +02:00

31 lines
588 B
Go

package eap
import (
"slices"
"goauthentik.io/internal/outpost/radius/eap/protocol"
)
type Settings struct {
ProtocolsToOffer []protocol.Type
ProtocolSettings map[protocol.Type]interface{}
}
type StateManager interface {
GetEAPSettings() Settings
GetEAPState(string) *State
SetEAPState(string, *State)
}
type State struct {
ChallengesToOffer []protocol.Type
TypeState map[protocol.Type]any
}
func BlankState(settings Settings) *State {
return &State{
ChallengesToOffer: slices.Clone(settings.ProtocolsToOffer),
TypeState: map[protocol.Type]any{},
}
}