(parentHandler *Handler, r *mux.Router, app *App, oauthClient oauthClient, callbackProxy *callbackProxyClient)
| 307 | } |
| 308 | |
| 309 | func configureOauthRoutes(parentHandler *Handler, r *mux.Router, app *App, oauthClient oauthClient, callbackProxy *callbackProxyClient) { |
| 310 | handler := &oauthHandler{ |
| 311 | Config: app.Config(), |
| 312 | DB: app.DB(), |
| 313 | Store: app.SessionStore(), |
| 314 | oauthClient: oauthClient, |
| 315 | EmailKey: app.keys.EmailKey, |
| 316 | callbackProxy: callbackProxy, |
| 317 | } |
| 318 | r.HandleFunc("/oauth/"+oauthClient.GetProvider(), parentHandler.OAuth(handler.viewOauthInit)).Methods("GET") |
| 319 | r.HandleFunc("/oauth/callback/"+oauthClient.GetProvider(), parentHandler.OAuth(handler.viewOauthCallback)).Methods("GET") |
| 320 | r.HandleFunc("/oauth/signup", parentHandler.OAuth(handler.viewOauthSignup)).Methods("POST") |
| 321 | } |
| 322 | |
| 323 | func (h oauthHandler) viewOauthCallback(app *App, w http.ResponseWriter, r *http.Request) error { |
| 324 | ctx := r.Context() |
no test coverage detected