MCPcopy
hub / github.com/krakenjs/lusca / getCsrf

Function getCsrf

lib/csrf.js:66–79  ·  view source on GitHub ↗
(req, secret)

Source from the content-addressed store, hash-verified

64 cookie.options = options.cookie && options.cookie.options || {};
65
66 function getCsrf(req, secret) {
67 var _impl, validate, _token, _secret;
68
69 _impl = impl.create(req, secret);
70 validate = impl.validate || _impl.validate;
71 _token = _impl.token || _impl;
72 _secret = _impl.secret;
73
74 return {
75 validate: validate,
76 token: _token,
77 secret: _secret
78 };
79 }
80
81 function setToken(res, token) {
82 res.locals[key] = token;

Callers 1

csrf.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected