All Projects → passport → express-4.x-http-bearer-example

passport / express-4.x-http-bearer-example

Licence: Unlicense license
Express 4.x app using Passport for authentication via HTTP Bearer scheme.

Programming Languages

javascript
184084 projects - #8 most used programming language

This example demonstrates how to use Express 4.x and Passport to authenticate users via the HTTP Bearer scheme. Use this example as a starting point for your own web applications.

Instructions

To install this example on your computer, clone the repository and install dependencies.

$ git clone [email protected]:passport/express-4.x-http-bearer-example.git
$ cd express-4.x-http-bearer-example
$ npm install

Start the server.

$ node server.js

Use curl to send an authenticated request.

$ curl -v -H "Authorization: Bearer 123456789" http://127.0.0.1:3000/

Sponsor

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].