Commit Graph

64 Commits

Author SHA1 Message Date
Gerasimos (Makis) Maropoulos
64da28af8b one for today, one for tomorrow and ready :)
Former-commit-id: 2e0a335c84c1d9c57a61b7f3203e54f7cccd7dcc
2017-12-30 20:40:52 +02:00
Gerasimos (Makis) Maropoulos
8fd4dc2b4b update badger sessiondb
Former-commit-id: 8419d561ef732d6e4d0d3bb5536db540e1dd3a9f
2017-12-27 03:40:10 +02:00
Gerasimos (Makis) Maropoulos
4ab889da5f minor comment updates for sessions package
Former-commit-id: 6f73c5d83861a1f61acda07e7f78cb882320dc8c
2017-12-24 19:43:31 +02:00
Gerasimos (Makis) Maropoulos
7f423ba068 thinking a new way of displaying the README, give no readme hand-written examples, we have the _examples folder already but I should continue creating the new documentation for deep understanding and show a part of it on readme as image(?)
Former-commit-id: 9b6a6bceffb6ae23bf490d78cad31367ca2aa78e
2017-12-24 06:24:45 +02:00
Gerasimos (Makis) Maropoulos
91ee8287a8 Merge branch 'master' into dev
Former-commit-id: d338e6e846b4379199015dc4ae76677b2d8cbe53
2017-12-21 14:46:58 +02:00
Gerasimos (Makis) Maropoulos
e67621b8ec grammar fixes(?)
Former-commit-id: bf2ff1df8c841643eb2ebfc8524ba869d02c99b3
2017-12-16 23:12:49 +02:00
Gerasimos (Makis) Maropoulos
68cc6641d4 Add session.Destroy (before I've added: Increment & Decrement entry helpers as well) | Improve the debug messages for the controllers
Former-commit-id: f5f17b05252a5032ace1e2d0fdd2304fc4004635
2017-12-16 23:09:00 +02:00
Gerasimos (Makis) Maropoulos
55dfd195e0 remove the old 'mvc' folder - examples are not changed yet - add the 'di' package inside the mvc2 package - which will be renamed to 'mvc' on the next commit - new mvc.Application and some dublications removed - The new version will be version 9 because it will contain breaking changes (not to the end-developer's controllers but to the API they register them) - get ready for 'Christmas Edition' for believers
Former-commit-id: c7114233dee90ee308c0a3e77ec2ad0c361094b8
2017-12-15 20:28:06 +02:00
Wing Gao
c6b12ab754 need a better way to replace an existed cookie
Former-commit-id: bee4a686d50e61e607e7f86c1dee93a877cd1413
2017-12-15 22:42:18 +08:00
Wing Gao
859a62bf01 fix cookie expire equals to -1 when call UpdateExpiration
Former-commit-id: 69107db0f9be87db2057c6d261bd896c0358bc45
2017-12-15 21:46:18 +08:00
Gerasimos (Makis) Maropoulos
ea863914dc update the vendor json library which is used when 'WithOptimizations' passed on 'app.Run' and resolve https://github.com/kataras/iris/pull/839#issuecomment-351374343
Former-commit-id: ad3354717d593393a3f3aec863ec92f1f7e1c829
2017-12-13 14:37:02 +02:00
kataras
15feaf0237 Update to version 8.5.5 | Read HISTORY.md
Former-commit-id: dced7d472edabbab4f80c76051f13261928a8dea
2017-11-02 05:54:33 +02:00
Bill Q
4383d0c2e7 Update AUTHORS
Former-commit-id: 63cebcbb80ab06c4311c46edf97f6e515eef633f
2017-10-24 16:25:34 +03:00
Gerasimos (Makis) Maropoulos
99c18f5a86 fix badger session db can't built, they changed their api 3 hours ago: https://github.com/dgraph-io/badger/pull/261
This is the last time I update this session database, if they change their API again iris will vendor that session database and remove the `sessions/sessiondb/badger.go#NewFromDB`

Relative: https://github.com/dgraph-io/badger/pull/261

Read https://github.com/kataras/iris/blob/master/HISTORY.md#tu-10-october-2017--v851 for the previous release.


Former-commit-id: b8df7292f3b73c5ba2b595514c58fb0c85bc1ec5
2017-10-10 17:07:01 +03:00
Gerasimos (Makis) Maropoulos
4fb78bbcd9 Update sessions/sessiondb/badger to its latest version and SessionController is able to initialize itself if session manager is not provided by the caller-dev.
Changes:

Update the badger database using transactions, as supported from yesterday via: 06242925c2

Add a custom `OnActivate` via mvc/activator/activate_listener.go, this can be used to perform any custom actions when the app registers the supported Controllers. See mvc/session_controller.go for the excellent use case.

errors.Reporter.AddErr returns true if the error is added to the stack, otherwise false


Former-commit-id: c896a2d186a4315643f3c5fdb4325f7ee48a9e0a
2017-10-06 01:19:10 +03:00
Gerasimos (Makis) Maropoulos
cf1e580cde Add two examples for folder structuring as requested at https://github.com/kataras/iris/issues/748
Former-commit-id: 27c97d005d9cbd2309587b11fc9e2bab85870502
2017-10-01 04:31:13 +03:00
Gerasimos (Makis) Maropoulos
7989a2fd72 fix https://github.com/kataras/iris/issues/771
Former-commit-id: 5659b6ca274bb51d7de0d079b0e87c0c513540a6
2017-09-30 23:52:32 +03:00
Gerasimos (Makis) Maropoulos
88b2343bd9 Implement "badger" kv store back-end for sessions
Former-commit-id: b9d85467238b5611d177b2b95ac9815cf5f8fe83
2017-09-24 14:32:16 +03:00
Gerasimos (Makis) Maropoulos
9ff124d39f fix url host is empty when !edge on sessions subdomains persistence
Former-commit-id: 335a4f252e387d939b2cf9311e3acc8b35a41ce9
2017-09-21 12:31:54 +03:00
kataras
3ec5ff58c9 Fix https://github.com/kataras/iris/issues/726
My second mistake on redis session db because I'm not personally use redis, so I'm waiting for redis users to find these type of errors inside it, such as @sy264115809


Former-commit-id: df84348df7509c0f863f41f01de6ed6db6e8133e
2017-08-21 20:59:54 +03:00
kataras
14aa770869 minor session enhancements
Former-commit-id: be6503e9b12c138ccc4dbce415bf3fa301e454e7
2017-08-21 01:45:02 +03:00
kataras
996961dd86 fix redis sessiondb expiration
I don't know why I did add LifeTime.Second() back then, it was silly of me but didn't receive any reports except a commit comment 25 minutes ago, so we can assume that redis is almost "dead" nowdays. Thank you for the notice @sy264115809


Former-commit-id: 140caa2a42aa16b1e80905d24976c481eae24c69
2017-08-20 18:57:19 +03:00
kataras
b96476d100 Update to 8.3.0 | MVC Models and Bindings and fix of #723 , read HISTORY.md
Former-commit-id: d8f66d8d370c583a288333df2a14c6ee2dc56466
2017-08-18 17:09:18 +03:00
kataras
35620f6ecb Update to 8.2.6 | More on Iris Controllers: optional EndRequest. Read HISTORY.md
Former-commit-id: 5255ca5c4a898e2f3e7388f3af0457599e65f87f
2017-08-14 16:21:51 +03:00
hiveminded
be8295eb50 simple version checker ✌️
Former-commit-id: 077b9c9816211c84adda864a832acf8c1296eeaf
2017-08-09 17:12:24 +03:00
kataras
87d0f2e967 Add "Blogs" | Prev Commit: Update to 8.2.1 | LevelDB-based session database implemented, Read HISTORY.md
Former-commit-id: 1b7b288c1cf1d400f229794a33f3c049054f341f
2017-08-08 16:05:16 +03:00
kataras
056f9a9415 Update to 8.2.1 | LevelDB-based session database implemented, Read HISTORY.md
Former-commit-id: 4e341b185aedaaa9a04fdebe43b4364dec59e3c8
2017-08-08 16:00:34 +03:00
kataras
92d0b146df remove MaxAgeSeconds from redis sessiondb - now it derives from the sessions configuration automatically. Add option to use an existing BoltDB connection on boltdb sessiondb.
TODO: leveldb sessiondb

Former-commit-id: 8cb781bf089ab7b9a09dccc633454db9c6077610
2017-08-08 12:31:42 +03:00
kataras
48e352e1df Update to 8.2.0 | BoltDB session database, fix file sessiondb, faster, simpler and improvement Session Database API
Former-commit-id: 4034737a65b78a77277e4283fd9289c17f4a452e
2017-08-07 06:04:35 +03:00
kataras
36e6fb37b8 remove second "and" from sessions/sessiondb/file#SerializeBytes comment.
Former-commit-id: b648f43eb2827dbb682ef3aac7f99643a15619a5
2017-08-03 00:43:43 +03:00
kataras
94043bc117 Session DB File Storage: Catch and Log any error (i.e if access denied) as requested https://github.com/kataras/iris/issues/704#issuecomment-319804704
Former-commit-id: 6a96da0bde5ae8d999fc9c1e6af49db2a893a6d5
2017-08-03 00:38:17 +03:00
kataras
8a7e718bb1 Session DB file storage: https://github.com/kataras/iris/issues/702 example added
Tested on Windows and worked, waiting for more testers.


Former-commit-id: 2b5be0202c1124f424d2276948c3203677f26a56
2017-08-02 21:52:53 +03:00
kataras
d08c8aa1d6 Session database for file-storage https://github.com/kataras/iris/issues/702 using the latest API (Not tested on every OS, yet)
Former-commit-id: fb98f86f2a602d543ca1abb5281a30af96462c11
2017-08-02 21:18:37 +03:00
kataras
6fb90cfdb4 Implement a file-storage session database for https://github.com/kataras/iris/issues/702 (UNTESTED)
Former-commit-id: 7ca4183ee0602936d8270d6e7dac6bec3d3fa2b5
2017-08-02 20:53:17 +03:00
corebreaker
8fded5f86d Test decoded cookie for empty strings
Fixes up issue #698.
The input of `decodeCookieValue` is tested in case of there is an empty string, so then its output really reflect the validity of the input.
It takes in consideration that underlying decoder can unvalidate the cookie.

Former-commit-id: a82cccfe1c252c68ceeb4126ea43495fa2cdf96d
2017-08-02 09:40:54 +03:00
hiveminded
9143ccec6e add PartyFunc and gofmt -s -w . 🔷
Former-commit-id: a3809498a45140d691f3f235ad9cb25239d495a2
2017-08-01 22:25:08 +03:00
corebreaker
9b61ce2531 Add IsNew flag on sessions
Former-commit-id: 94ac010a156bbe124033da2cbaac05fc4726d189
2017-08-01 11:00:30 +03:00
corebreaker
ef979cf541 Little change of session API + Update examples
Former-commit-id: e8c58b186acf1c8932af6e886dae7035f4d581c1
2017-08-01 08:34:18 +03:00
corebreaker
0f1a265e5a Fix up for sessions
- Restore expiration state of the sessions
- Add APIs to modify expire date
- Free the timer for the session destroy task

Former-commit-id: 4d796a9efba2c37cd3750275ac62c068ceb82be8
2017-07-31 21:49:30 +03:00
hiveminded
9a0b18acbf move sessions and websocket examples, gofmt, fix misspells and experimental optimizations 🍐
Former-commit-id: cae4f94bbd404d26ab13dade02b52f81feaddf24
2017-07-22 22:57:20 +03:00
hiveminded
bd61bf2405 modify the targeted test for gorilla/securecookie integration with iris session manager 🍥
Former-commit-id: a8a499c149e4a31f2b475f64e8ff93799608819c
2017-07-11 18:09:32 +03:00
kataras
9f85b74fc9 Add notes for the new lead maintainer of the open-source iris project and align with @get-ion/ion by @hiveminded
Former-commit-id: da4f38eb9034daa49446df3ee529423b98f9b331
2017-07-10 18:32:42 +03:00
kataras
e4df35e351 Fix https://github.com/iris-contrib/community-board/issues/10 and upgrade the minor version number
Former-commit-id: 02f6656aceb890217bfc19688d7f45224df274ec
2017-06-12 18:23:35 +03:00
kataras
6ab00aa02f Update to 7.0.3. Read HISTORY.md
Former-commit-id: fc5a3c7ab655116ddf0dcb9c1c1657080d096c69
2017-06-10 05:28:17 +03:00
kataras
dd26fbf26d move example flash-messages to sessions example folder and change httptest example with basicauth
Former-commit-id: 3c5f6c97629a2a6ae44e62f2900edd32c0329b50
2017-06-10 05:00:18 +03:00
kataras
acd3389dd7 Fix the yesterday's SetImmutable feature... I'm idiot.
Former-commit-id: 12c96dacf6932ca3f6d37a4a9e40b66b7fe9b077
2017-06-08 14:34:02 +03:00
kataras
14e7751d21 SetImmutable for sessions and context's values. https://github.com/iris-contrib/community-board/issues/5
New package "memstore" created, read it to see how I made it.


Former-commit-id: 9edc344b938786b2ef68defec03c44259a2d539c
2017-06-08 03:39:15 +03:00
kataras
5e4b63acb2 Publish the new version ✈️ | Look description please!
# FAQ

### Looking for free support?

	http://support.iris-go.com
    https://kataras.rocket.chat/channel/iris

### Looking for previous versions?

    https://github.com/kataras/iris#version

### Should I upgrade my Iris?

Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.
> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes.

**How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris`.
For further installation support, please click [here](http://support.iris-go.com/d/16-how-to-install-iris-web-framework).

### About our new home page
    http://iris-go.com

Thanks to [Santosh Anand](https://github.com/santoshanand) the http://iris-go.com has been upgraded and it's really awesome!

[Santosh](https://github.com/santoshanand) is a freelancer, he has a great knowledge of nodejs and express js, Android, iOS, React Native, Vue.js etc, if you need a developer to find or create a solution for your problem or task, please contact with him.

The amount of the next two or three donations you'll send they will be immediately transferred to his own account balance, so be generous please!

Read more at https://github.com/kataras/iris/blob/master/HISTORY.md


Former-commit-id: eec2d71bbe011d6b48d2526eb25919e36e5ad94e
2017-06-03 23:22:52 +03:00
Makis Maropoulos
077984bd60 🌈 sessions were re-written, update to 4.0.0-alpha.2, read HISTORY.md
**Sessions were re-written **

- Developers can use more than one 'session database', at the same time,
to store the sessions
- Easy to develop a custom session database (only two functions are
required (Load & Update)), [learn
more](https://github.com/iris-contrib/sessiondb/blob/master/redis/database.go)
- Session databases are located
[here](https://github.com/iris-contrib/sessiondb), contributions are
welcome
- The only frontend deleted 'thing' is the: **config.Sessions.Provider**
- No need to register a database, the sessions works out-of-the-box
- No frontend/API changes except the
`context.Session().Set/Delete/Clear`, they doesn't return errors
anymore, btw they (errors) were always nil :)
- Examples (master branch) were updated.

```sh
$ go get github.com/iris-contrib/sessiondb/$DATABASE
```

```go
db := $DATABASE.New(configurationHere{})
iris.UseSessionDB(db)
```

> Note: Book is not updated yet, examples are up-to-date as always.
2016-07-15 20:50:36 +03:00
Makis Maropoulos
0cb2351a4f Fix some invalid unlocks from the last change 2016-07-07 13:05:11 +02:00