Comparing version 0.0.1 to 0.0.2
@@ -48,4 +48,4 @@ // Load modules | ||
request.api.crumb = crumb; | ||
return request.api.crumb; | ||
request.plugins.crumb = crumb; | ||
return request.plugins.crumb; | ||
}; | ||
@@ -74,3 +74,3 @@ | ||
var crumb = request[request.route.plugins._crumb.source][request.route.plugins._crumb.key]; | ||
if (crumb !== request.api.crumb) { | ||
if (crumb !== request.plugins.crumb) { | ||
return next(Boom.forbidden()); | ||
@@ -93,3 +93,3 @@ } | ||
if (internals.config.addToViewContext && | ||
request.api.crumb && | ||
request.plugins.crumb && | ||
request.response && | ||
@@ -99,3 +99,3 @@ request.response.varieties.view) { | ||
request.response.view.context = request.response.view.context || {}; | ||
request.response.view.context.crumb = request.api.crumb; | ||
request.response.view.context.crumb = request.plugins.crumb; | ||
} | ||
@@ -102,0 +102,0 @@ |
{ | ||
"name": "crumb", | ||
"description": "CSRF crumb generation plugin", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors": [], |
@@ -48,4 +48,4 @@ // Load modules | ||
expect(this.api.crumb).to.exist; | ||
expect(this.server.api.crumb.generate).to.exist; | ||
expect(this.plugins.crumb).to.exist; | ||
expect(this.server.plugins.crumb.generate).to.exist; | ||
@@ -52,0 +52,0 @@ return this.reply.view('index', { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55296