koajs / csrf

CSRF tokens for koa
MIT License
264 stars 32 forks source link

Why assertCsrf method given a body value? #26

Closed kenchan0130 closed 8 years ago

kenchan0130 commented 8 years ago

Currently, assertCsrf method has the body argument.

But I thought it look like that assertCsrf method presuppose request.body.

I seem that some developer have to understand those implements.

So, the body argument of assertCsrf method should have like default value which is this.request.body.

What do you think?

niftylettuce commented 8 years ago

Can you take a look at the new code for Koa@next here and let me know if this is still an issue or how we can fix it? https://github.com/koajs/csrf