added totp support

This commit is contained in:
ston1th 2018-10-27 16:05:17 +02:00
commit bac08dc7cf
16 changed files with 448 additions and 32 deletions

View file

@ -94,6 +94,10 @@ func (s *HTTPServer) buildRoutes() http.Handler {
}
func (s *HTTPServer) contextWrapper(h ctxHandler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
h(newContext(w, r, s))
ctx := newContext(w, r, s)
if ctx == nil {
return
}
h(ctx)
}
}