fxa-content-server/README.md

66 строки
1.7 KiB
Markdown
Исходник Обычный вид История

# 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)
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).
It consumes the REST API which PICL provides.
## 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)
## 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)
## Persona Bridge Setup
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
Issuer determines the hostname and the environment`PORT` variable the port.
2013-08-13 01:11:10 +04:00
PORT=3030 npm start
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
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'
}