Commit Graph

4 Commits

Author SHA1 Message Date
Gerasimos (Makis) Maropoulos
0733ea37c0 Enhance the view engine's example for {{url ...}} and {{urlpath ...}} tmpl funcs for reverse routing.
Former-commit-id: ec3cda69e5cbe5a04842150011b3788b70055572
2017-03-19 02:06:15 +02:00
Gerasimos (Makis) Maropoulos
73dc9adf10 Add an example for sessions + securecookie. Relative: http://support.iris-go.com/d/29-mark-cookie-for-session-as-secure
Former-commit-id: 10c30aabdf6b8fa59457ed8296b3e87108d3861c
2017-03-18 23:43:04 +02:00
Gerasimos (Makis) Maropoulos
d51c0b7b50 Implement feature request: http://support.iris-go.com/d/29-mark-cookie-for-session-as-secure
Example:

app := iris.New()
app.Adapt(httprouter.New())
// IMPORTANT
cookieName := "mycustomsessionid"
// AES only supports key sizes of 16, 24 or 32 bytes.
// You either need to provide exactly that amount or you derive the key
from what you type in.
hashKey := []byte("the-big-and-secret-fash-key-here")
blockKey := []byte("lot-secret-of-characters-big-too")
secureCookie := securecookie.New(hashKey, blockKey)

app.Adapt(sessions.New(sessions.Config{
Cookie: cookieName,
Encode: secureCookie.Encode,
Decode: secureCookie.Decode,
}))

Former-commit-id: 6fe5ce6cb834d55862242e08405fad4e721caa5b
2017-03-18 12:22:20 +02:00
Gerasimos (Makis) Maropoulos
5872eb1b12 Add tests for RedirectTo, Sessions, Flash messages and for Cookies.
Former-commit-id: 5a631c366c4caf1d45c532dc5363459cb595f067
2017-02-19 10:23:01 +02:00