summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-08-09 10:43:54 -0500
committerGitHub <noreply@github.com>2016-08-09 10:43:54 -0500
commit6b0e3d62fbcab1949f27a5da9c9fde2ad4a00969 (patch)
treee538faa57e00901d5be388aec75d0181cb8128c9 /api
parentaa9f71039b10d1008a4f731204522856d15de6f3 (diff)
downloadchat-6b0e3d62fbcab1949f27a5da9c9fde2ad4a00969.tar.gz
chat-6b0e3d62fbcab1949f27a5da9c9fde2ad4a00969.tar.bz2
chat-6b0e3d62fbcab1949f27a5da9c9fde2ad4a00969.zip
PLT-3865 Fix OAuth provider routes (#3768)
Diffstat (limited to 'api')
-rw-r--r--api/oauth.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/oauth.go b/api/oauth.go
index e2ea001a0..fe2ecf166 100644
--- a/api/oauth.go
+++ b/api/oauth.go
@@ -33,11 +33,11 @@ func InitOAuth() {
BaseRoutes.OAuth.Handle("/{service:[A-Za-z0-9]+}/complete", AppHandlerIndependent(completeOAuth)).Methods("GET")
BaseRoutes.OAuth.Handle("/{service:[A-Za-z0-9]+}/login", AppHandlerIndependent(loginWithOAuth)).Methods("GET")
BaseRoutes.OAuth.Handle("/{service:[A-Za-z0-9]+}/signup", AppHandlerIndependent(signupWithOAuth)).Methods("GET")
- BaseRoutes.OAuth.Handle("/authorize", ApiUserRequired(authorizeOAuth)).Methods("GET")
- BaseRoutes.OAuth.Handle("/access_token", ApiAppHandler(getAccessToken)).Methods("POST")
+ BaseRoutes.OAuth.Handle("/authorize", AppHandlerTrustRequester(authorizeOAuth)).Methods("GET")
+ BaseRoutes.OAuth.Handle("/access_token", ApiAppHandlerTrustRequester(getAccessToken)).Methods("POST")
BaseRoutes.Root.Handle("/authorize", AppHandlerTrustRequester(authorizeOAuth)).Methods("GET")
- BaseRoutes.Root.Handle("/access_token", ApiAppHandler(getAccessToken)).Methods("POST")
+ BaseRoutes.Root.Handle("/access_token", ApiAppHandlerTrustRequester(getAccessToken)).Methods("POST")
// Handle all the old routes, to be later removed
BaseRoutes.Root.Handle("/{service:[A-Za-z0-9]+}/complete", AppHandlerIndependent(completeOAuth)).Methods("GET")