Skip to content

Commit

Permalink
Merge pull request #245 from outbrain/remove-oauth
Browse files Browse the repository at this point in the history
removed oauth code; not ready yet
  • Loading branch information
Shlomi Noach authored Aug 17, 2016
2 parents 1765789 + 436e83e commit f01a391
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions go/app/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,15 @@ 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"
"github.com/outbrain/orchestrator/go/inst"
"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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f01a391

Please sign in to comment.