@@ -25,20 +25,15 @@ import (
25
25
"github.com/martini-contrib/auth"
26
26
"github.com/martini-contrib/gzip"
27
27
"github.com/martini-contrib/render"
28
- "github.com/martini-contrib/sessions"
29
28
"github.com/outbrain/golib/log"
30
29
"github.com/outbrain/orchestrator/go/config"
31
30
"github.com/outbrain/orchestrator/go/http"
32
31
"github.com/outbrain/orchestrator/go/inst"
33
32
"github.com/outbrain/orchestrator/go/logic"
34
33
"github.com/outbrain/orchestrator/go/process"
35
34
"github.com/outbrain/orchestrator/go/ssl"
36
-
37
- martinioauth2 "github.com/martini-contrib/oauth2"
38
- golang_oauth2 "golang.org/x/oauth2"
39
35
)
40
36
41
- var oauthStateString = process .ProcessToken .Hash
42
37
var sslPEMPassword []byte
43
38
var agentSSLPEMPassword []byte
44
39
@@ -97,19 +92,6 @@ func standardHttp(discovery bool) {
97
92
return auth .SecureCompare (username , config .Config .HTTPAuthUser ) && auth .SecureCompare (password , config .Config .HTTPAuthPassword )
98
93
}))
99
94
}
100
- case "oauth" :
101
- {
102
- oauthConf := & golang_oauth2.Config {
103
- ClientID : config .Config .OAuthClientId ,
104
- ClientSecret : config .Config .OAuthClientSecret ,
105
- Scopes : config .Config .OAuthScopes ,
106
- RedirectURL : "http://localhost:3000/oauth2callback" ,
107
- }
108
- m .Use (sessions .Sessions ("oauth_session" , sessions .NewCookieStore ([]byte ("oauth_secret" ))))
109
- m .Use (martinioauth2 .Github (oauthConf ))
110
- m .Use (martinioauth2 .LoginRequired )
111
- m .Map (auth .User ("" ))
112
- }
113
95
default :
114
96
{
115
97
// We inject a dummy User object because we have function signatures with User argument in api.go
0 commit comments