internal: use Expires not MaxAge for LDAP session

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-05-11 10:04:11 +02:00
parent e897307548
commit 25a4310bb1

View file

@ -56,7 +56,7 @@ func (sb *SessionBinder) Bind(username string, req *bind.Request) (ldap.LDAPResu
sb.sessions.Set(Credentials{ sb.sessions.Set(Credentials{
DN: req.BindDN, DN: req.BindDN,
Password: req.BindPW, Password: req.BindPW,
}, result, time.Duration(flags.Session.MaxAge)) }, result, time.Until(flags.Session.Expires))
} }
return result, err return result, err
} }