1
0
mirror of https://github.com/kataras/iris.git synced 2026-03-06 00:16:12 +00:00

Add session.Destroy (before I've added: Increment & Decrement entry helpers as well) | Improve the debug messages for the controllers

Former-commit-id: f5f17b05252a5032ace1e2d0fdd2304fc4004635
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-12-16 23:09:00 +02:00
parent b8cafce6b9
commit 68cc6641d4
7 changed files with 119 additions and 53 deletions

View File

@@ -31,6 +31,16 @@ type (
}
)
// Destroy destroys this session, it removes all sessions and flash values,
// the session entry from the server and updates the registered session databases,
// note that this method does NOT removes the client's cookie, although
// it should be re-seted if new session is attached to that (client).
//
// Use the session's manager `Destroy(ctx)` in order to remove the cookie as well.
func (s *Session) Destroy() {
s.provider.deleteSession(s)
}
// ID returns the session's ID.
func (s *Session) ID() string {
return s.sid