FAQ
Dear all,

            I will use Go to build a Web server. Now I want to have a
session id returned to a user login with username and password. And I think
I am ok with the login procedure. the user will use session id each time he
wants to post data. However, after the user login, if the user does not
send data within 3 minutes, I will try to destroy the session that makes
the the session id no longer valid.

            so how can I make the session expired when the user NOT post
data within 3 minutes. ( I will use beego, beego have timeout for session
but it does mention it will timeout depends on the post data interval )

  Thanks.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Mikespook at Aug 12, 2014 at 9:17 am
    Session normally depends on Cookie.
    I think you can limit the cookie expired time in 3 minutes(your
    session's life time), and renew it when the user post data(your logic,
    your code).

    2014-08-12 17:10 GMT+08:00, Peter Hon <peterhon321@gmail.com>:
    Dear all,

    I will use Go to build a Web server. Now I want to have a
    session id returned to a user login with username and password. And I think

    I am ok with the login procedure. the user will use session id each time he

    wants to post data. However, after the user login, if the user does not
    send data within 3 minutes, I will try to destroy the session that makes
    the the session id no longer valid.

    so how can I make the session expired when the user NOT post
    data within 3 minutes. ( I will use beego, beego have timeout for session
    but it does mention it will timeout depends on the post data interval )

    Thanks.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    --
    Xing Xing (邢星)
    mikespook <mikespook@gmail.com>
    http://mikespook.com

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 12, '14 at 9:10a
activeAug 12, '14 at 9:17a
posts2
users2
websitegolang.org

2 users in discussion

Peter Hon: 1 post Mikespook: 1 post

People

Translate

site design / logo © 2021 Grokbase