5.0.4 • Published 4 years ago

border-patrol v5.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Border Patrol

NOTE: This README is incomplete.

A service which does oauth authentication and issues a JWT.

Installation

  1. Install via npm.
npm i -g border-patrol
  1. Create a postgres database and create the tables with scripts found under the 'db' directory.

Running

You'd use something like this.

border-patrol -p 8080 -c /path/to/your/config

An example directory containing config files (which are JS files) can be found under the 'example-config' directory. This is where you specify database connection strings, jwt and oauth keys etc.

Authenticating

Send the browser to {YOUR_DOMAIN}/authenticate/{OAUTH_SERVICE}?success=SOME_URL&newuser=OTHER_URL. For example: www.example.com/authenticate/github?success=example.com/success&newuser=example.com/newuser. The page will redirect to example.com/success if the authenticated user is found in the database, and to example.com/newuser if the authenticated user is not found in the database.

Key Value Store

Border Patrol can also store key value pairs for authenticated users. Users possessing a valid JWT can do so by posting to 'key', 'value' and 'tags' fields to /me/kvstore.

Check if a user id exists

To check if some-id exists in the database, do an HTTP GET to /user-ids/some-id.

5.0.4

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.1.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.4.2

5 years ago

3.4.0

5 years ago

3.4.1

5 years ago

3.3.3

5 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.8

5 years ago

3.2.7

5 years ago

3.2.6

5 years ago

3.2.5

5 years ago

3.2.4

5 years ago

3.2.3

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago