1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Add regenerate secret feature for oauth2 (#6291)

* Add regenerate secret functionality

* Fix lint
This commit is contained in:
Jonas Franz
2019-03-09 17:29:58 +01:00
committed by GitHub
parent 8211e01d9e
commit 8fffb06168
3 changed files with 33 additions and 1 deletions

View File

@@ -302,6 +302,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/applications/oauth2", func() {
m.Get("/:id", userSetting.OAuth2ApplicationShow)
m.Post("/:id", bindIgnErr(auth.EditOAuth2ApplicationForm{}), userSetting.OAuthApplicationsEdit)
m.Post("/:id/regenerate_secret", userSetting.OAuthApplicationsRegenerateSecret)
m.Post("", bindIgnErr(auth.EditOAuth2ApplicationForm{}), userSetting.OAuthApplicationsPost)
m.Post("/delete", userSetting.DeleteOAuth2Application)
})