<commit_before># Firefox Accounts Persona Bridge

[![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.

## Development Setup

```
npm install
npm start
```

## Testing

  * Download: [Selenium Server Standalone 2.35.0](http://selenium.googlecode.com/files/selenium-server-standalone-2.35.0.jar)
  * 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 Development Setup

### One Time Setup

    cp server/config/local.json-dist server/config/local.json
<commit_msg>updated README.md to include prereqs section<commit_after># Firefox Accounts Persona Bridge

[![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

### One Time Setup

    cp server/config/local.json-dist server/config/local.json

{'fraction_non_alphanumeric': 0.1211326691137913, 'fraction_numerical': 0.01415836392239119, 'mean_word_length': 4.2707182320441985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1132652', 'n_tokens_mistral': 660, 'n_tokens_neox': 605, 'n_words': 178}