1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

Add iris.DestroySessionByID(string) and iris.DestroyAllSessions() as requested.

This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-01-08 06:11:50 +02:00
parent 7df9b2b437
commit bcc35c11ca
4 changed files with 60 additions and 4 deletions

View File

@@ -2,6 +2,22 @@
**How to upgrade**: remove your `$GOPATH/src/github.com/kataras` folder, open your command-line and execute this command: `go get -u github.com/kataras/iris/iris`.
## 6.0.4 -> 6.0.5
- Add `iris.DestroySessionByID(string)` and `iris.DestroyAllSessions()` functions as requested by a community member in the [chat]https://kataras.rocket.chat/channel/iris):
```go
// DestroySessionByID removes the session entry
// from the server-side memory (and database if registered).
// Client's session cookie will still exist but it will be reseted on the next request.
//
// It's safe to use it even if you are not sure if a session with that id exists.
DestroySessionByID(string)
// DestroyAllSessions removes all sessions
// from the server-side memory (and database if registered).
// Client's session cookie will still exist but it will be reseted on the next request.
DestroyAllSessions()
```
## 6.0.3 -> 6.0.4
@@ -62,6 +78,8 @@ I tried to minimize the side affects.
If you don't find something you used to use come here and check that conversional list:
- `iris.ToHandlerFunc` -> `iris.ToHandler`
- `context.Response.BodyWriter() io.Writer` -> `context.ResponseWriter` is a http.ResponseWriter(and io.Writer) now.
- `context.RequestCtx` removed and replaced by `context.ResponseWriter (*iris.ResponseWriter -> http.ResponseWriter)` and `context.Request (*http.Request)`