krb5: Allow login with email address

This commit is contained in:
nemunaire 2022-09-10 00:27:08 +02:00
parent 6323d96b60
commit ebd09e8270

View File

@ -64,6 +64,8 @@ func checkAuthKrb5(c *gin.Context) {
cnf.LibDefaults.DefaultTktEnctypeIDs = parseETypes(cnf.LibDefaults.DefaultTktEnctypes, cnf.LibDefaults.AllowWeakCrypto)
cnf.LibDefaults.PermittedEnctypeIDs = parseETypes(cnf.LibDefaults.PermittedEnctypes, cnf.LibDefaults.AllowWeakCrypto)
lf.Login = strings.TrimSuffix(lf.Login, "@epita.fr")
cl := client.NewWithPassword(lf.Login, "CRI.EPITA.FR", lf.Password, cnf)
if err := cl.Login(); err != nil {
if errk, ok := err.(krberror.Krberror); ok {