• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hoodiehq / hoodie-server-account / 179
93%

Build:
DEFAULT BRANCH: master
Ran 21 Dec 2015 07:02PM UTC
Jobs 1
Files 36
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
179

push

travis-ci

gr2m
feat: use PouchDB instance instead of CouchDB url

BREAKING CHANGE:

Before we passed `options.couchdb` to the hapi plugin, which then
made direct requests to CouchDB, authenticating using the Cookie header

```js
var options = {
  couchdb: {
    url: http://localhost:5984,
    admin: {
      username: admin,
      password: secret
    }
  }
}
```

Now we pass in a PouchDB instance instead. We now calculate and validate session
IDs directly in node using the server secret and the user account docs with
[couchdb-calculate-session-id](https://github.com/hoodiehq/couchdb-calculate-session-id)

```js
var PouchDB = require(PouchDB)
PouchDB.plugin(require(pouchdb-users)

var db = new PouchDB(http://localhost:5984/_users)

db.useAsAuthenticationDB().then(function () {
  var options = {
    usersDb: db,
    admins: {
      admin: -pbkdf2-a2ca9d3ee,1081b31868d1f712e,10
    },
    secret: secret123
  })
})
```

* * *

This commit was sponsored by &yet.

Our friends at &yet have been supporters of Hoodie since its earliest days. <3
And they have availability for new projects! We think they’re some of the best
people you can hire anywhere, but you can read what other people have to say
about them and their work here:

https://andyet.com/case-studies/

896 of 964 relevant lines covered (92.95%)

2.41 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
api/accounts/update.js
1
100.0
api/sessions/add.js
3
100.0
routes/account.js
4
100.0
routes/accounts.js
5
100.0
routes/session.js
18
100.0
tests/integration/utils/couchdb-error-tests.js
Jobs
ID Job ID Ran Files Coverage
1 179.1 21 Dec 2015 07:02PM UTC 0
92.95
Travis Job 179.1
Source Files on build 179
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #179
  • 736e27ad on github
  • Prev Build on master (#85)
  • Next Build on master (#188)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc