iris/adaptors/sessions
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
..
_example SessionsPolicy and sessions adaptor, history and _example written. 2017-02-15 20:06:19 +02:00
sessiondb Add an example for httprouter_test, gofmt everything and misspel fixes. 2017-02-17 10:45:47 +02:00
config.go Implement feature request: http://support.iris-go.com/d/29-mark-cookie-for-session-as-secure 2017-03-18 12:22:20 +02:00
cookie.go Add an example for httprouter_test, gofmt everything and misspel fixes. 2017-02-17 10:45:47 +02:00
database.go SessionsPolicy and sessions adaptor, history and _example written. 2017-02-15 20:06:19 +02:00
LICENSE SessionsPolicy and sessions adaptor, history and _example written. 2017-02-15 20:06:19 +02:00
provider.go SessionsPolicy and sessions adaptor, history and _example written. 2017-02-15 20:06:19 +02:00
session.go SessionsPolicy and sessions adaptor, history and _example written. 2017-02-15 20:06:19 +02:00
sessions.go Implement feature request: http://support.iris-go.com/d/29-mark-cookie-for-session-as-secure 2017-03-18 12:22:20 +02:00