From bf58679390b9045054139fd0f43bef9bb972f3e6 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 11 May 2014 18:10:37 +0800 Subject: add support for smtp authentication --- modules/auth/authentication.go | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'modules') diff --git a/modules/auth/authentication.go b/modules/auth/authentication.go index 1a5fdcb0..89ccc560 100644 --- a/modules/auth/authentication.go +++ b/modules/auth/authentication.go @@ -15,17 +15,22 @@ import ( ) type AuthenticationForm struct { - Id int64 `form:"id"` - Type int `form:"type"` - AuthName string `form:"name" binding:"Required;MaxSize(50)"` - Domain string `form:"domain" binding:"Required"` - Host string `form:"host" binding:"Required"` - Port int `form:"port" binding:"Required"` - BaseDN string `form:"base_dn" binding:"Required"` - Attributes string `form:"attributes" binding:"Required"` - Filter string `form:"filter" binding:"Required"` - MsAdSA string `form:"ms_ad_sa" binding:"Required"` - IsActived bool `form:"is_actived"` + Id int64 `form:"id"` + Type int `form:"type"` + AuthName string `form:"name" binding:"Required;MaxSize(50)"` + Domain string `form:"domain"` + Host string `form:"host"` + Port int `form:"port"` + BaseDN string `form:"base_dn"` + Attributes string `form:"attributes"` + Filter string `form:"filter"` + MsAdSA string `form:"ms_ad_sa"` + IsActived bool `form:"is_actived"` + SmtpAuth string `form:"smtpauth"` + SmtpHost string `form:"smtphost"` + SmtpPort int `form:"smtpport"` + SmtpTls bool `form:"smtptls"` + AllowAutoRegister bool `form:"allowautoregister"` } func (f *AuthenticationForm) Name(field string) string { -- cgit v1.2.3