Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: scheduler/appengine/frontend/handler.go

Issue 2830443003: auth: Refactor how authentication methods are passed to server/auth library. (Closed)
Patch Set: fix test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/frontend/main_test.go ('k') | scheduler/appengine/ui/common.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/appengine/frontend/handler.go
diff --git a/scheduler/appengine/frontend/handler.go b/scheduler/appengine/frontend/handler.go
index 7611d4094ace51dafa04ecb68f9fa2ff044cff6e..c7c0da090d50df0b27443249a750d6060f6cea5d 100644
--- a/scheduler/appengine/frontend/handler.go
+++ b/scheduler/appengine/frontend/handler.go
@@ -30,10 +30,8 @@ import (
"github.com/luci/luci-go/grpc/discovery"
"github.com/luci/luci-go/grpc/grpcmon"
"github.com/luci/luci-go/grpc/prpc"
- "github.com/luci/luci-go/server/auth"
"github.com/luci/luci-go/server/router"
- "github.com/luci/luci-go/appengine/gaeauth/server"
"github.com/luci/luci-go/appengine/gaemiddleware"
"github.com/luci/luci-go/common/data/rand/mathrand"
@@ -141,22 +139,20 @@ func init() {
PubSubPushPath: "/pubsub",
})
- // Middleware chains. 'baseUI' is used for web interface routes, 'base' for
- // everything else.
+ // Do global init before handling requests.
base := gaemiddleware.BaseProd().Extend(
func(c *router.Context, next router.Handler) {
globalInit.Do(func() { initializeGlobalState(c.Context) })
next(c)
},
)
- baseUI := base.Extend(auth.Use(auth.Authenticator{server.CookieAuth}))
// Setup HTTP routes.
r := router.New()
gaemiddleware.InstallHandlersWithMiddleware(r, base)
- ui.InstallHandlers(r, baseUI, ui.Config{
+ ui.InstallHandlers(r, base, ui.Config{
Engine: globalEngine,
Catalog: globalCatalog,
TemplatesPath: "templates",
« no previous file with comments | « milo/appengine/frontend/main_test.go ('k') | scheduler/appengine/ui/common.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698