2013-07-31 03:08:38 +04:00
|
|
|
# Firefox Accounts Persona Bridge
|
|
|
|
|
2013-08-29 04:18:09 +04:00
|
|
|
[![Build Status](https://travis-ci.org/mozilla/firefox-account-bridge.png)](https://travis-ci.org/mozilla/firefox-account-bridge)
|
|
|
|
|
2013-07-31 03:08:38 +04:00
|
|
|
This is a Node.js server which implements the Persona identity provider (IdP) protocol.
|
|
|
|
It allows users to sign in to Firefox Accounts (aka PICL).
|
2013-07-31 18:23:08 +04:00
|
|
|
It consumes the REST API which PICL provides.
|
|
|
|
|
2013-09-14 02:13:59 +04:00
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
* node 0.10.x or higher
|
|
|
|
* npm
|
|
|
|
* Java
|
|
|
|
* [Selenium Server Standalone 2.35.0](http://selenium.googlecode.com/files/selenium-server-standalone-2.35.0.jar)
|
|
|
|
|
2013-08-31 01:45:46 +04:00
|
|
|
## Development Setup
|
|
|
|
|
|
|
|
```
|
|
|
|
npm install
|
|
|
|
npm start
|
|
|
|
```
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
* Run in the background: `java -jar selenium-server-standalone-2.35.0.jar`
|
|
|
|
* TDD: `npm test`
|
|
|
|
* Functional: `npm run-script test-functional`
|
|
|
|
|
|
|
|
* Server test: `npm run-script test-server` (Selenium server not required)
|
|
|
|
|
2013-09-14 02:13:59 +04:00
|
|
|
## Persona Bridge Setup
|
2013-07-31 18:23:08 +04:00
|
|
|
|
2013-08-01 00:32:47 +04:00
|
|
|
### One Time Setup
|
|
|
|
|
2013-08-01 00:35:26 +04:00
|
|
|
cp server/config/local.json-dist server/config/local.json
|
2013-08-01 00:32:47 +04:00
|
|
|
|
|
|
|
### Running the service
|
|
|
|
|
2013-07-31 18:23:08 +04:00
|
|
|
Issuer determines the hostname and the environment`PORT` variable the port.
|
|
|
|
|
2013-08-13 01:11:10 +04:00
|
|
|
PORT=3030 npm start
|
2013-07-31 18:23:08 +04:00
|
|
|
|
|
|
|
The easiest way to develop, is to run a local browserid instance and `SHIMMED_PRIMARIES`:
|
|
|
|
|
|
|
|
You have to save the `/.well-known/browserid` to the file system:
|
|
|
|
|
|
|
|
curl http://localhost:3030/.well-known/browserid > /tmp/fxwellknown
|
|
|
|
|
|
|
|
And then start up browserid:
|
|
|
|
|
|
|
|
SHIMMED_PRIMARIES="dev.fxaccounts.mozilla.org|http://127.0.0.1:3030|/tmp/fxwellknown" npm start
|
|
|
|
|
2013-08-01 21:07:41 +04:00
|
|
|
Now you can type foo@dev.fxaccounts.mozilla.org in the test dialog at http://127.0.0.1:10001/. No DNS or `/etc/hosts` hacks are needed.
|
|
|
|
|
2013-09-05 03:54:25 +04:00
|
|
|
Password is 'asdf'.
|
|
|
|
|
|
|
|
### Configuration
|
|
|
|
|
|
|
|
The default idp server is `http://idp.dev.lcip.org`. To change this, edit
|
|
|
|
`config.json` on your deployed instance.
|
|
|
|
|
|
|
|
{
|
|
|
|
'fxaccount_url': 'http://your.idp.here.org'
|
|
|
|
}
|
|
|
|
|