start tying it into the flow
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user