Skip to content

custom encode/decode support - #40

Closed
jlarsson wants to merge 1 commit into
koajs:masterfrom
jlarsson:master
Closed

custom encode/decode support#40
jlarsson wants to merge 1 commit into
koajs:masterfrom
jlarsson:master

Conversation

@jlarsson

@jlarsson jlarsson commented Jul 6, 2015

Copy link
Copy Markdown
Contributor

This PR adds support for custom encoding/decoding besides the default base64(json()) schema.

A basic test case is included.

app.use(session({
  encode: function (session) { ... },
  decode: function (encodedSession) { ... },
})

My motivation behind this is to be able to plugin custom encryption/obfuscation of the cookies.

Thanks for a great module 👍

Cheers

@dead-horse

Copy link
Copy Markdown
Member

landed 63b46d5

🍻

@dead-horse dead-horse closed this Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants