| @@ -47,7 +47,9 @@ func apiV1Login(w http.ResponseWriter, r *http.Request, ss *loan.Session) { | |||
| } | |||
| //log in user | |||
| if u.Id == ss.User { | |||
| ss.RenewIfExpireSoon() | |||
| *ss = trial //we are the same | |||
| } else if !ss.IsEmpty() { | |||
| ss.ReuseAsUser(u.Id, ss.Expire) | |||
| } else { | |||
| ss.InitForUser(ss.User, time.Now().Add(loan.DefaultSessionDuration)) | |||
| } | |||
| @@ -76,6 +76,7 @@ func apiV1DumpRequest(w http.ResponseWriter, r *http.Request, ss *loan.Session) | |||
| ar := apiV1ResponseBlank() | |||
| ar.Env.Msg = msg | |||
| ar.Env.Session = *ss | |||
| ar.Env.Session.Bin = []byte("masked data") //clear | |||
| ar.Env.Session.Secret = "***********" | |||
| ar.add("Body", dumpLines) | |||
| b, _ := ar.toJson() | |||