|
@@ -163,8 +163,15 @@ func (a *AuthAgent) HandleAutologinTokenLogin(w http.ResponseWriter, r *http.Req
|
|
|
|
|
|
session.Save(r, w)
|
|
|
|
|
|
- //Redirect this client to its interface module
|
|
|
- http.Redirect(w, r, "/", 307)
|
|
|
+ redirectTarget, _ := mv(r, "redirect", false)
|
|
|
+ if redirectTarget != "" {
|
|
|
+ //Redirect to target website
|
|
|
+ http.Redirect(w, r, redirectTarget, http.StatusTemporaryRedirect)
|
|
|
+ } else {
|
|
|
+ //Redirect this client to its interface module
|
|
|
+ http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//Check if the given autologin token is valid. Autologin token is different from session token (aka token)
|