fixed auth middleware
This commit is contained in:
@@ -11,9 +11,11 @@ func ApplyAuthenticationByConfig(next http.Handler) http.Handler {
|
|||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
if config.Instance().RequireAuth {
|
if config.Instance().RequireAuth {
|
||||||
Authenticated(next)
|
Authenticated(next)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if config.Instance().UseOpenId {
|
if config.Instance().UseOpenId {
|
||||||
openid.Middleware(next)
|
openid.Middleware(next)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
next.ServeHTTP(w, r)
|
next.ServeHTTP(w, r)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user