{ "_args": [ [ { "raw": "csrf@~3.0.0", "scope": null, "escapedName": "csrf", "name": "csrf", "rawSpec": "~3.0.0", "spec": ">=3.0.0 <3.1.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/csurf" ] ], "_from": "csrf@>=3.0.0 <3.1.0", "_id": "csrf@3.0.6", "_inCache": true, "_location": "/csrf", "_nodeVersion": "4.7.3", "_npmOperationalInternal": { "host": "packages-18-east.internal.npmjs.com", "tmp": "tmp/csrf-3.0.6.tgz_1489549463230_0.9222420507576317" }, "_npmUser": { "name": "dougwilson", "email": "doug@somethingdoug.com" }, "_npmVersion": "2.15.11", "_phantomChildren": {}, "_requested": { "raw": "csrf@~3.0.0", "scope": null, "escapedName": "csrf", "name": "csrf", "rawSpec": "~3.0.0", "spec": ">=3.0.0 <3.1.0", "type": "range" }, "_requiredBy": [ "/csurf" ], "_resolved": "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz", "_shasum": "b61120ddceeafc91e76ed5313bb5c0b2667b710a", "_shrinkwrap": null, "_spec": "csrf@~3.0.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/csurf", "author": { "name": "Jonathan Ong", "email": "me@jongleberry.com", "url": "http://jongleberry.com" }, "bugs": { "url": "https://github.com/pillarjs/csrf/issues" }, "contributors": [ { "name": "Douglas Christopher Wilson", "email": "doug@somethingdoug.com" } ], "dependencies": { "rndm": "1.2.0", "tsscmp": "1.0.5", "uid-safe": "2.1.4" }, "description": "primary logic behind csrf tokens", "devDependencies": { "bluebird": "3.5.0", "eslint": "3.17.1", "eslint-config-standard": "7.0.1", "eslint-plugin-markdown": "1.0.0-beta.4", "eslint-plugin-promise": "3.5.0", "eslint-plugin-standard": "2.1.1", "istanbul": "0.4.5", "mocha": "2.5.3" }, "directories": {}, "dist": { "shasum": "b61120ddceeafc91e76ed5313bb5c0b2667b710a", "tarball": "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz" }, "engines": { "node": ">= 0.8" }, "files": [ "LICENSE", "HISTORY.md", "README.md", "index.js" ], "gitHead": "018ec746e8ce5dea10dda78a2480a0a9e756f1a8", "homepage": "https://github.com/pillarjs/csrf#readme", "keywords": [ "csrf", "tokens" ], "license": "MIT", "maintainers": [ { "name": "dougwilson", "email": "doug@somethingdoug.com" }, { "name": "dwolla", "email": "api@dwolla.com" }, { "name": "jongleberry", "email": "jonathanrichardong@gmail.com" } ], "name": "csrf", "optionalDependencies": {}, "readme": "# CSRF\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-image]][node-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nLogic behind CSRF token creation and verification.\n\nRead [Understanding-CSRF](https://github.com/pillarjs/understanding-csrf)\nfor more information on CSRF. Use this module to create custom CSRF middleware.\n\nLooking for a CSRF framework for your favorite framework that uses this\nmodule?\n\n * Express/connect: [csurf](https://www.npmjs.com/package/csurf) or\n [alt-xsrf](https://www.npmjs.com/package/alt-xsrf)\n * Koa: [koa-csrf](https://www.npmjs.com/package/koa-csrf) or\n [koa-atomic-session](https://www.npmjs.com/package/koa-atomic-session)\n\n### Install\n\n```sh\n$ npm install csrf\n```\n\n## API\n\n\n\n```js\nvar Tokens = require('csrf')\n```\n\n### new Tokens([options])\n\nCreate a new token generation/verification instance. The `options` argument is\noptional and will just use all defaults if missing.\n\n#### Options\n\nTokens accepts these properties in the options object.\n\n##### saltLength\n\nThe length of the internal salt to use, in characters. Internally, the salt\nis a base 62 string. Defaults to `8` characters.\n\n##### secretLength\n\nThe length of the secret to generate, in bytes. Note that the secret is\npassed around base-64 encoded and that this length refers to the underlying\nbytes, not the length of the base-64 string. Defaults to `18` bytes.\n\n#### tokens.create(secret)\n\nCreate a new CSRF token attached to the given `secret`. The `secret` is a\nstring, typically generated from the `tokens.secret()` or `tokens.secretSync()`\nmethods. This token is what you should add into HTML `