Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
properly indent sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
lloyd committed Jan 27, 2012
1 parent cad9b04 commit 84e0501
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions docs/PRIMARY_PROTOCOL.md
Expand Up @@ -245,21 +245,20 @@ user has successfully authenticated with the primary.

### 5.1 Example

// set up UI
navigator.id.beginAuthentication(function(email) {
// update UI to display the email address
});

//
function onAuthentication() {
// check if the user authenticated successfully, if not, tell them
// it's a bad password. otherwise..
navigator.id.completeAuthentication();
}

function onCancel() {
navigator.id.cancelAuthentication();
}
// set up UI
navigator.id.beginAuthentication(function(email) {
// update UI to display the email address
});

function onAuthentication() {
// check if the user authenticated successfully, if not, tell them
// it's a bad password. otherwise..
navigator.id.completeAuthentication();
}

function onCancel() {
navigator.id.cancelAuthentication();
}

### 5.2 JavaScript Shim

Expand Down

0 comments on commit 84e0501

Please sign in to comment.