From 436e83e4c77f3d3b7c4d5423dd1444a9a1ab2902 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Wed, 17 Aug 2016 12:53:16 +0200 Subject: [PATCH] removed oauth code; not ready yet --- go/app/http.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/go/app/http.go b/go/app/http.go index c32cda4c..7f137210 100644 --- a/go/app/http.go +++ b/go/app/http.go @@ -25,7 +25,6 @@ import ( "github.com/martini-contrib/auth" "github.com/martini-contrib/gzip" "github.com/martini-contrib/render" - "github.com/martini-contrib/sessions" "github.com/outbrain/golib/log" "github.com/outbrain/orchestrator/go/config" "github.com/outbrain/orchestrator/go/http" @@ -33,12 +32,8 @@ import ( "github.com/outbrain/orchestrator/go/logic" "github.com/outbrain/orchestrator/go/process" "github.com/outbrain/orchestrator/go/ssl" - - martinioauth2 "github.com/martini-contrib/oauth2" - golang_oauth2 "golang.org/x/oauth2" ) -var oauthStateString = process.ProcessToken.Hash var sslPEMPassword []byte var agentSSLPEMPassword []byte @@ -97,19 +92,6 @@ func standardHttp(discovery bool) { return auth.SecureCompare(username, config.Config.HTTPAuthUser) && auth.SecureCompare(password, config.Config.HTTPAuthPassword) })) } - case "oauth": - { - oauthConf := &golang_oauth2.Config{ - ClientID: config.Config.OAuthClientId, - ClientSecret: config.Config.OAuthClientSecret, - Scopes: config.Config.OAuthScopes, - RedirectURL: "http://localhost:3000/oauth2callback", - } - m.Use(sessions.Sessions("oauth_session", sessions.NewCookieStore([]byte("oauth_secret")))) - m.Use(martinioauth2.Github(oauthConf)) - m.Use(martinioauth2.LoginRequired) - m.Map(auth.User("")) - } default: { // We inject a dummy User object because we have function signatures with User argument in api.go