thomseddon/node-oauth2-server — pull request #100 by bertramn (2014-08-29 16:02:36+00:00)
Title: Added index.js for mongodb including a model config file

I created a mongodb version of the postges index.js. I also created a a model in the mongodb but when I send a post to `http://127.0.0.1:3000/oauth/token` with the basic auth header `Authorization: Basic dGVzdHVzZXI6dGVzdA==` and the encoded form `grant_type=password&username=testuser&passsword=test` all I get is below error. Any change the example could be made into "working example"? I noticed that the req.body in the grant check does not contain any data even though I am posting it correctly (tried various means from postman to curl and all failed).

```
Error
at OAuth2Error (C:\dev\workspaces\oss\oauth\node-oauth2-server\lib\error.js:30:12)
at Grant.extractCredentials (C:\dev\workspaces\oss\oauth\node-oauth2-server\lib\grant.js:69:17)
at run (C:\dev\workspaces\oss\oauth\node-oauth2-server\lib\runner.js:15:14)
at runner (C:\dev\workspaces\oss\oauth\node-oauth2-server\lib\runner.js:19:5)
at new Grant (C:\dev\workspaces\oss\oauth\node-oauth2-server\lib\grant.js:56:3)
at Object.OAuth2Server.grant [as handle] (C:\dev\workspaces\oss\oauth\node-oauth2-server\lib\oauth2server.js:88:5)
at next_layer (C:\dev\workspaces\oss\oauth\node-oauth2-server\node_modules\express\lib\router\route.js:103:13)
at next_layer (C:\dev\workspaces\oss\oauth\node-oauth2-server\node_modules\express\lib\router\route.js:81:14)
at Route.dispatch (C:\dev\workspaces\oss\oauth\node-oauth2-server\node_modules\express\lib\router\route.js:107:5)
at proto.handle.c (C:\dev\workspaces\oss\oauth\node-oauth2-server\node_modules\express\lib\router\index.js:213:24)
```