encode extension AVPs

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-24 01:46:33 +02:00
parent fad18db70b
commit fb01a117ad
5 changed files with 25 additions and 6 deletions

View File

@ -127,6 +127,7 @@ func (p *Payload) Handle(ctx protocol.Context) protocol.Payload {
return nil
}
ctx.Log().Info("MSCHAPv2: Successfully checked password")
p.st.Authenticated = true
succ := &SuccessRequest{
Payload: &Payload{
OpCode: OpSuccess,
@ -134,7 +135,7 @@ func (p *Payload) Handle(ctx protocol.Context) protocol.Payload {
Authenticator: auth,
}
return succ
} else if p.OpCode == OpSuccess {
} else if p.OpCode == OpSuccess && p.st.Authenticated {
return &peap.ExtensionPayload{
AVPs: []peap.ExtensionAVP{
{