ExternalProviderRedirect redirects the request to the oauth provider
(w http.ResponseWriter, r *http.Request)
| 24 | |
| 25 | // ExternalProviderRedirect redirects the request to the oauth provider |
| 26 | func (a *API) ExternalProviderRedirect(w http.ResponseWriter, r *http.Request) error { |
| 27 | rurl, err := a.GetExternalProviderRedirectURL(w, r, nil) |
| 28 | if err != nil { |
| 29 | return err |
| 30 | } |
| 31 | http.Redirect(w, r, rurl, http.StatusFound) // #nosec G710 |
| 32 | return nil |
| 33 | } |
| 34 | |
| 35 | // GetExternalProviderRedirectURL returns the URL to start the oauth flow with the corresponding oauth provider |
| 36 | func (a *API) GetExternalProviderRedirectURL(w http.ResponseWriter, r *http.Request, linkingTargetUser *models.User) (string, error) { |
nothing calls this directly
no test coverage detected