might actually happen?
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
26
internal/outpost/radius/eap/state.go
Normal file
26
internal/outpost/radius/eap/state.go
Normal file
@ -0,0 +1,26 @@
|
||||
package eap
|
||||
|
||||
import "slices"
|
||||
|
||||
type Settings struct {
|
||||
ChallengesToOffer []Type
|
||||
ChallengeSettings map[Type]interface{}
|
||||
}
|
||||
|
||||
type StateManager interface {
|
||||
GetEAPSettings() Settings
|
||||
GetEAPState(string) *State
|
||||
SetEAPState(string, *State)
|
||||
}
|
||||
|
||||
type State struct {
|
||||
ChallengesToOffer []Type
|
||||
TypeState map[Type]any
|
||||
}
|
||||
|
||||
func BlankState(settings Settings) *State {
|
||||
return &State{
|
||||
ChallengesToOffer: slices.Clone(settings.ChallengesToOffer),
|
||||
TypeState: map[Type]any{},
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user