From 3fb1b6a608625067a76ba90f9855d48c4d6555bd Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 17 Sep 2015 16:11:44 -0400 Subject: drop oauth2 feature support --- cmd/web.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'cmd/web.go') diff --git a/cmd/web.go b/cmd/web.go index 0e6c5e7b..cc857597 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -23,7 +23,6 @@ import ( "github.com/macaron-contrib/captcha" "github.com/macaron-contrib/csrf" "github.com/macaron-contrib/i18n" - "github.com/macaron-contrib/oauth2" "github.com/macaron-contrib/session" "github.com/macaron-contrib/toolbox" "github.com/mcuadros/go-version" @@ -167,13 +166,6 @@ func newMacaron() *macaron.Macaron { }, }, })) - - // OAuth 2. - if setting.OauthService != nil { - for _, info := range setting.OauthService.OauthInfos { - m.Use(oauth2.NewOAuth2Provider(info.Options, info.AuthUrl, info.TokenUrl)) - } - } m.Use(middleware.Contexter()) return m } @@ -256,7 +248,6 @@ func runWeb(ctx *cli.Context) { m.Group("/user", func() { m.Get("/login", user.SignIn) m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost) - m.Get("/info/:name", user.SocialSignIn) m.Get("/sign_up", user.SignUp) m.Post("/sign_up", bindIgnErr(auth.RegisterForm{}), user.SignUpPost) m.Get("/reset_password", user.ResetPasswd) @@ -275,14 +266,12 @@ func runWeb(ctx *cli.Context) { m.Combo("/ssh").Get(user.SettingsSSHKeys). Post(bindIgnErr(auth.AddSSHKeyForm{}), user.SettingsSSHKeysPost) m.Post("/ssh/delete", user.DeleteSSHKey) - m.Get("/social", user.SettingsSocial) m.Combo("/applications").Get(user.SettingsApplications). Post(bindIgnErr(auth.NewAccessTokenForm{}), user.SettingsApplicationsPost) m.Post("/applications/delete", user.SettingsDeleteApplication) m.Route("/delete", "GET,POST", user.SettingsDelete) }, reqSignIn, func(ctx *middleware.Context) { ctx.Data["PageIsUserSettings"] = true - ctx.Data["HasOAuthService"] = setting.OauthService != nil }) m.Group("/user", func() { -- cgit v1.2.3