fix: auther cast

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias 2018-12-28 23:59:03 +00:00
parent 6c7d096166
commit 522f863c6d

View File

@ -46,10 +46,13 @@ func (e *Env) getHandlers() (http.Handler, http.Handler) {
} }
if e.Settings.AuthMethod == auth.MethodJSONAuth { if e.Settings.AuthMethod == auth.MethodJSONAuth {
auther := e.Auther.(auth.JSONAuth) auther := e.Auther.(*auth.JSONAuth)
data["ReCaptcha"] = auther.ReCaptcha.Key != "" && auther.ReCaptcha.Secret != ""
data["ReCaptchaHost"] = auther.ReCaptcha.Host if auther.ReCaptcha != nil {
data["ReCaptchaKey"] = auther.ReCaptcha.Key data["ReCaptcha"] = auther.ReCaptcha.Key != "" && auther.ReCaptcha.Secret != ""
data["ReCaptchaHost"] = auther.ReCaptcha.Host
data["ReCaptchaKey"] = auther.ReCaptcha.Key
}
} }
index := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { index := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {