aboutsummaryrefslogtreecommitdiffstats
path: root/modern.go
diff options
context:
space:
mode:
Diffstat (limited to 'modern.go')
-rw-r--r--modern.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/modern.go b/modern.go
index 6277796..79bebd3 100644
--- a/modern.go
+++ b/modern.go
@@ -83,7 +83,12 @@ func (store *SqlStore) AuthGetSession(r *http.Request) ApiResponse {
var response struct {
Session *Session `json:"session"`
}
- session := NewSession("thibauthorel", r.FormValue("api_key"), "2.0")
+ session := &Session{
+ User: "thibauthorel",
+ Client: r.FormValue("api_key"),
+ Protocol: "2.0",
+ Key: randomToken(16),
+ }
store.PutSession(session)
response.Session = session
return response