This repository contains several distinct things related to BrowserID:
- the browserid server - a node.js server which implements a web services api, stores a record of users, the email addresses they've verified, a bcrypted password, outstanding verification tokens, etc
- the verifier - a stateless node.js server which does cryptographic verification of assertions. This thing is hosted on browserid.org as a convenience, but people using browserid can choose to relocated it if they want to their own servers.
- sample and test code - to test the above
Quick Start Virtual Machine
We've prepared a VM so you can test/hack/have fun with BrowserID without modifying your local computer (too much). Skip to the next section "Dependencies", for detailed instructions to install this codebase locally, instead of using Vagrant.
- Install Vagrant.
This does add ruby, ruby-gems, and VirtualBox to your local desktop computer. No other software or changes will be made.
- Boot up the VM:
cd browserid vagrant up vagrant ssh npm start
vagrant up will take a while. Go get a cup of coffee. This is because it downloads the 500MB VM.
Any changes to the source code on your local computer are immediately mirrored in the VM.
Handy for dev and QA tasks, but if you want to install from scratch...
Here's the software you'll need installed:
- node.js (>= 0.6.2): http://nodejs.org/
- npm: http://npmjs.org/ (or bundled with node in 0.6.3+)
- install node and npm
npm installto install 3rd party libraries and generate keys
npm startto start the servers locally
- visit the demo application ('rp') in your web browser (url output on the console at runtime)
You can stop the servers with a Cntl-C in the terminal.
Staying up to date:
- rm -Rf var node_modules
- npm install
Unit tests can be run by invoking
npm test at the top level, and you
should run them often. Like before committing code. To fully test
the code you should install mysql and have a well permissions
user (can create and drop databases). If you don't have mysql installed,
code testing is still possible (it just uses a little json database).
branching & release model - You'll notice some funky branching conventions, like the default branch is named
dev rather than
master as you might expect. We're using gitflow: the approach is described in a blog post.
contributions - please issue pull requests targeted at the