1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

add access to the session manager through new 'Session.Man' field

relative to: https://github.com/kataras/iris/issues/1485


Former-commit-id: c4ced38b74af42bfcd17abe6b439b35db6837bbf
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-13 22:15:55 +03:00
parent 486e57b9ae
commit a1e6d81b49
4 changed files with 20 additions and 14 deletions

View File

@@ -237,12 +237,12 @@ func TestSessionsUpdateExpiration(t *testing.T) {
app.Post("/remember_me", func(ctx iris.Context) {
// re-sends the cookie with the new Expires and MaxAge fields,
// test checks that on same session id too.
sess.UpdateExpiration(ctx, 24*time.Hour)
sessions.Get(ctx).Man.UpdateExpiration(ctx, 24*time.Hour)
writeResponse(ctx)
})
app.Get("/destroy", func(ctx iris.Context) {
sess.Destroy(ctx) // this will delete the cookie too.
sessions.Get(ctx).Man.Destroy(ctx) // this will delete the cookie too.
})
e := httptest.New(t, app, httptest.URL("http://example.com"))