aboutsummaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
authorskyblue <ssx205@gmail.com>2014-04-12 09:42:09 +0800
committerskyblue <ssx205@gmail.com>2014-04-12 09:42:09 +0800
commit5c1312f38e8968e068125a1b1dd59060f3f29bfe (patch)
tree92f442d78974645e98465de73679d3e163f681bb /web.go
parent4c6e0e94995b95d3493c6641fbb5a528c6d6c134 (diff)
downloadgitea-5c1312f38e8968e068125a1b1dd59060f3f29bfe.tar.gz
gitea-5c1312f38e8968e068125a1b1dd59060f3f29bfe.zip
clean oauth2 code
Diffstat (limited to 'web.go')
-rw-r--r--web.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/web.go b/web.go
index b2be73d677..e7b048bcd3 100644
--- a/web.go
+++ b/web.go
@@ -20,7 +20,6 @@ import (
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
- "github.com/gogits/gogs/modules/oauth2"
"github.com/gogits/gogs/routers"
"github.com/gogits/gogs/routers/admin"
"github.com/gogits/gogs/routers/api/v1"
@@ -59,17 +58,6 @@ func runWeb(*cli.Context) {
m.Use(middleware.Renderer(middleware.RenderOptions{Funcs: []template.FuncMap{base.TemplateFuncs}}))
m.Use(middleware.InitContext())
- if base.OauthService != nil {
- if base.OauthService.GitHub.Enabled {
- m.Use(oauth2.Github(&oauth2.Options{
- ClientId: base.OauthService.GitHub.ClientId,
- ClientSecret: base.OauthService.GitHub.ClientSecret,
- RedirectURL: base.AppUrl + oauth2.PathCallback[1:],
- Scopes: []string{base.OauthService.GitHub.Scopes},
- }))
- }
- }
-
reqSignIn := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: true})
ignSignIn := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: base.Service.RequireSignInView})
ignSignInAndCsrf := middleware.Toggle(&middleware.ToggleOptions{