Forward from the notification URL to the oauth flow
This commit is contained in:
parent
1fd407681e
commit
390e5120e1
2 changed files with 9 additions and 0 deletions
|
|
@ -42,6 +42,14 @@ func getFavicon(w http.ResponseWriter, r *http.Request) {
|
|||
http.ServeFile(w, r, "static/favicon.ico")
|
||||
}
|
||||
|
||||
func getOAuthRefresh(w http.ResponseWriter, r *http.Request) {
|
||||
user, err := getAuthenticatedUser(r)
|
||||
if err != nil {
|
||||
http.Redirect(w, r, "/?next=/oauth/refresh", http.StatusFound)
|
||||
}
|
||||
htmlOauthPrompt(w, user)
|
||||
}
|
||||
|
||||
func getPhoneCall(w http.ResponseWriter, r *http.Request) {
|
||||
htmlPhoneCall(w)
|
||||
}
|
||||
|
|
|
|||
1
main.go
1
main.go
|
|
@ -64,6 +64,7 @@ func main() {
|
|||
r.Get("/arcgis/oauth/begin", getArcgisOauthBegin)
|
||||
r.Get("/arcgis/oauth/callback", getArcgisOauthCallback)
|
||||
r.Get("/qr-code/report/{code}", getQRCodeReport)
|
||||
r.Get("/oauth/refresh", getOAuthRefresh)
|
||||
r.Get("/phone-call", getPhoneCall)
|
||||
r.Get("/report", getReport)
|
||||
r.Get("/report/{code}", getReportDetail)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue