1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 02:50:19 +00:00
This commit is contained in:
astaxie
2013-11-02 00:16:10 +08:00
parent bc862e526d
commit d835b0c80f
5 changed files with 54 additions and 0 deletions

View File

@ -27,6 +27,7 @@ type Provider interface {
SessionRead(sid string) (SessionStore, error)
SessionRegenerate(oldsid, sid string) (SessionStore, error)
SessionDestroy(sid string) error
SessionAll() int //get all active session
SessionGC()
}
@ -195,6 +196,10 @@ func (manager *Manager) SessionRegenerateId(w http.ResponseWriter, r *http.Reque
return
}
func (manager *Manager) GetActiveSession() int {
return manager.provider.SessionAll()
}
//remote_addr cruunixnano randdata
func (manager *Manager) sessionId(r *http.Request) (sid string) {