Merge pull request #36 from braydonf/bug/dependency-post-install
Removed post install action that requires devDependencies
This commit is contained in:
commit
b1b2693a5c
27
README.md
27
README.md
|
@ -3,13 +3,28 @@ BitAuth
|
||||||
|
|
||||||
Passwordless authentication using Bitcoin cryptography
|
Passwordless authentication using Bitcoin cryptography
|
||||||
|
|
||||||
# Overview
|
## Overview
|
||||||
|
|
||||||
BitAuth is a way to do secure, passwordless authentication using the cryptography
|
BitAuth is a way to do secure, passwordless authentication using the cryptography
|
||||||
in Bitcoin. Instead of using a shared secret, the client signs each request using
|
in Bitcoin. Instead of using a shared secret, the client signs each request using
|
||||||
a private key and the server checks to make sure the signature is valid and matches
|
a private key and the server checks to make sure the signature is valid and matches
|
||||||
the public key.
|
the public key.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
Install with Node.js:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install bitauth
|
||||||
|
```
|
||||||
|
|
||||||
|
To generate a browser bundle, you can then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run make-dist
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Advantages over other authentication mechanisms
|
## Advantages over other authentication mechanisms
|
||||||
|
|
||||||
* By signing each request, man in the middle attacks are impossible.
|
* By signing each request, man in the middle attacks are impossible.
|
||||||
|
@ -73,11 +88,11 @@ a decentralized blockchain or datastore like namecoin. Key revocations could
|
||||||
be stored here as well as reviews/feedback to build a reputation around an
|
be stored here as well as reviews/feedback to build a reputation around an
|
||||||
identity.
|
identity.
|
||||||
|
|
||||||
# Getting Started
|
## Examples
|
||||||
|
|
||||||
Example server
|
Example server
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var bodyParser = require('body-parser');
|
var bodyParser = require('body-parser');
|
||||||
var rawBody = require('../lib/middleware/rawbody');
|
var rawBody = require('../lib/middleware/rawbody');
|
||||||
|
@ -117,7 +132,7 @@ app.listen(3000);
|
||||||
|
|
||||||
Example client
|
Example client
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
var request = require('request');
|
var request = require('request');
|
||||||
var bitauth = require('../lib/bitauth');
|
var bitauth = require('../lib/bitauth');
|
||||||
|
|
||||||
|
@ -181,7 +196,7 @@ for(k in keys) {
|
||||||
|
|
||||||
## Middleware
|
## Middleware
|
||||||
BitAuth exposes a connect middleware for use in connect or ExpressJS applications. Use:
|
BitAuth exposes a connect middleware for use in connect or ExpressJS applications. Use:
|
||||||
```
|
```javascript
|
||||||
var bitauth = require('bitauth');
|
var bitauth = require('bitauth');
|
||||||
app.use( bitauth.middleware );
|
app.use( bitauth.middleware );
|
||||||
```
|
```
|
||||||
|
@ -190,7 +205,7 @@ app.use( bitauth.middleware );
|
||||||
|
|
||||||
To build a browser compatible version of BitAuth, run the following command from the project's root directory:
|
To build a browser compatible version of BitAuth, run the following command from the project's root directory:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
npm run make-dist
|
npm run make-dist
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"make-dist": "sh scripts/make-dist.sh",
|
"make-dist": "sh scripts/make-dist.sh",
|
||||||
"postinstall": "npm run make-dist",
|
|
||||||
"test": "mocha test/*.js --reporter spec"
|
"test": "mocha test/*.js --reporter spec"
|
||||||
},
|
},
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
Loading…
Reference in New Issue