开发者社区> 镜像站> NPM> consulate-authcode-simple-secrets-redis
consulate-authcode-simple-secrets-redis
Redis backend for consulate-authcode-simple-secrets
Last updated 7 years ago by camshaft .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install consulate-authcode-simple-secrets-redis 
SYNC missed versions from official npm registry.

consulate-authcode-simple-secrets-redis Build Status

Redis backend for consulate-authcode-simple-secrets

Usage

var consulate = require('consulate')
  , authcode = require('consulate-authcode-simple-secrets')
  , authcodeRedis = require('consulate-authcode-simple-secrets-redis');

var app = consulate();

app.plugin(authcode({
  key: process.env.AUTHCODE_SECRET
}, authcodeRedis({
  url: process.env.MY_REDIS_URL, // defaults to `process.env.MY_REDIS_URL` or 'redis://localhost:6379'
  prefix: 'my-authcode-prefix', // defaults to 'authcode'
  ttl: 60 // time-to-live of the auth code in seconds - defaults to 10 minutes
})));

Tests

$ npm test

Current Tags

  • 0.1.0                                ...           latest (7 years ago)

1 Versions

  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)
Dependents (0)
None