#254 add controller func SessionRegenerateID
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | @@ -298,6 +298,11 @@ func (c *Controller) DelSession(name interface{}) { | ... | @@ -298,6 +298,11 @@ func (c *Controller) DelSession(name interface{}) { |
| 298 | c.CruSession.Delete(name) | 298 | c.CruSession.Delete(name) |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | func (c *Controller) SessionRegenerateID() { | ||
| 302 | c.CruSession = GlobalSessions.SessionRegenerateId(c.Ctx.ResponseWriter, c.Ctx.Request) | ||
| 303 | c.Ctx.Input.CruSession = c.CruSession | ||
| 304 | } | ||
| 305 | |||
| 301 | func (c *Controller) DestroySession() { | 306 | func (c *Controller) DestroySession() { |
| 302 | GlobalSessions.SessionDestroy(c.Ctx.ResponseWriter, c.Ctx.Request) | 307 | GlobalSessions.SessionDestroy(c.Ctx.ResponseWriter, c.Ctx.Request) |
| 303 | } | 308 | } | ... | ... |
-
Please register or sign in to post a comment