Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Session tokens for Tako

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
Octocat-spinner-32 token.js
README.md

tako-session-token

Just a session token middleware for Tako. Works great with tako-cookies.

Usage

var sessionToken = require("tako-session-token")

// use the default token of "tako-session"...
app.on("request", sessionToken)

// or define one of your own
app.on("request", sessionToken("myapp-session"))

// later...
app.route("/foo", function (req, res) {
  console.log(req.session) // some random string.

  // the idea is that then that random string will
  // be a key in some sort of persistent session
  // store such as redis, or something.
})
Something went wrong with that request. Please try again.