koajs / csrf

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

tests for `csrf.middleware` #19

Closed stephenmathieson closed 7 years ago

stephenmathieson commented 8 years ago

i can't seem to get it working, but app.use(require('koa-csrf')()) works fine. since csrf.middleware is the suggested way of using this thing, i'm surprised there are no tests for it

jonathanong commented 8 years ago

@fengmk2 @dead-horse i think you guys added the middleware feature

jonathanong commented 8 years ago

@stephenmathieson invited you to @koajs/sessions if you're interested in helping out

dead-horse commented 8 years ago

@stephenmathieson

there have some test cases for middleware usage, and I fixed the example, you can check it out.

stephenmathieson commented 8 years ago

thanks @jonathanong. not sure if i want the responsibility, but i'll think about it :)

@dead-horse the test cases don't use csrf.middleware; they use csrf() instead

dead-horse commented 8 years ago

@stephenmathieson it's a simplified way to using csrf as a middleware

stephenmathieson commented 7 years ago

Default signature has changed. Closing for now.