Add auth fallback endpoint (#405)

Also adds support for the recaptcha auth type.
This commit is contained in:
Parminder Singh 2019-08-14 23:04:49 +05:30 committed by Alex Chen
parent 28f60bec4e
commit d21a2fb152
4 changed files with 249 additions and 14 deletions

View file

@ -245,6 +245,13 @@ func Setup(
}),
).Methods(http.MethodGet, http.MethodPost, http.MethodOptions)
r0mux.Handle("/auth/{authType}/fallback/web",
common.MakeHTMLAPI("auth_fallback", func(w http.ResponseWriter, req *http.Request) *util.JSONResponse {
vars := mux.Vars(req)
return AuthFallback(w, req, vars["authType"], cfg)
}),
).Methods(http.MethodGet, http.MethodPost, http.MethodOptions)
r0mux.Handle("/pushrules/",
common.MakeExternalAPI("push_rules", func(req *http.Request) util.JSONResponse {
// TODO: Implement push rules API