start tying it into the flow

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-16 15:38:52 +02:00
parent 2a024238fe
commit fa06c9fe4e
7 changed files with 60 additions and 8 deletions

View File

@ -7,6 +7,7 @@ import (
)
type context struct {
req *radius.Request
state interface{}
log *log.Entry
settings interface{}
@ -14,6 +15,10 @@ type context struct {
endModifier func(p *radius.Packet) *radius.Packet
}
func (ctx context) Packet() *radius.Request {
return ctx.req
}
func (ctx context) ProtocolSettings() interface{} {
return ctx.settings
}
@ -30,6 +35,9 @@ func (ctx *context) SetProtocolState(st interface{}) {
}
func (ctx *context) EndInnerProtocol(st protocol.Status, mf func(p *radius.Packet) *radius.Packet) {
if ctx.endStatus != protocol.StatusUnknown {
return
}
ctx.endStatus = st
ctx.endModifier = mf
}