Skip to content

Instantly share code, notes, and snippets.

View nchapman's full-sized avatar

Nick Chapman nchapman

View GitHub Profile

Keybase proof

I hereby claim:

  • I am nchapman on github.
  • I am nchapman (https://keybase.io/nchapman) on keybase.
  • I have a public key ASABvqdLeDDs2ZlKAC16T_CtX8Zflf2I0qnEGpdfgJ4RIQo

To claim this, I am signing this object:

Disrupting disruptive disrupters since disruption disrupted.

Device response

2014/06/05 12:09:30 [3]handler:Cmd: Handling cmd response from device {cmd: {"t":{"ok":true,"la":34.0522,"lo":-118.2437,"ti":1401995370570},"has_passcode":false}, length: 85}

Websocket messages

{"Latitude":34.0522,"Longitude":-118.2437,"Altitude":0,"Time":1401995331812,"Lockable":false}
{"Latitude":0,"Longitude":0,"Altitude":0,"Time":0,"Lockable":false}

FxA Inter-Service Authentication and Delegation

This document describes the method by which Mozilla web services (called "RP"s, Relying Parties) can allow their users to "Sign In With Your Firefox Account". The RP server will receive proof that the user controls the given FxA, as well as credentials that grant it certain access to data on other servers on behalf of that user.

This uses an OAuth2 flow and a new "fxa-oauth-server" to issue and validate tokens. RPs can use these tokens to convince other servers (known as "Delegated Services") to accept their requests.

Basic Flow

The RP web page redirects the browser to a special login page on the FxA Content Server. The user then enters their email address and FxA password on this page, which verifies them and allocates a secret code, then redirects the browser back to the RP page. The code is then used by the RP backend server to verify the user's identity and obtain the OAuth token it will use for subsequent requests.

We couldn’t find that file to show.
Warning: Running "jscs:src" (jscs) task
Line must be at most 160 characters at app/tests/spec/lib/fxa-client.js :
409 | var publicKey = {
410 | algorithm: 'RS',
411 | n: '4759385967235610503571494339196749614544606692567785790953934768202714280652973091341316862993582789079872007974809511698859885077002492642203267408776123',
--------^
412 | e: '65537'
413 | };
>> 1 code style errors found!
@nchapman
nchapman / es.sh
Last active January 4, 2016 18:39
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.10.deb
sudo dpkg -i elasticsearch-0.90.10.deb
➜ fxa-content-server git:(master) grunt build
Running "clean:dist" (clean) task
Cleaning .tmp...OK
Running "useminPrepare:html" (useminPrepare) task
Going through app/index.html to update the config
Looking for build script HTML comment blocks
Found a block:
<!-- build:css(.tmp) styles/main.css -->
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Firefox Accounts</title>
<meta name="description" content="">
# development use only
Daemon 0
LogFacility -
ListenHTTPS
Address 0.0.0.0
Port 3443
Cert "tmp/certificates/ssl.pem"
xHTTP 1
AddHeader "X_FORWARDED_PROTO: https"