Skip to content

Commit

Permalink
Initial migration from upstream
Browse files Browse the repository at this point in the history
* Added CHANGELOG.md @rwky
* Updated travis to use node 6, 8, 10 and 11 @rwky
* Updated dev deps @rwky
* Fixed deprecation with Buffer @rwky
* Updated README.md and package.json for passport-next org @rwky
  • Loading branch information
rwky committed Nov 3, 2018
1 parent fa9337f commit 0a966a7
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 87 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: "node_js"
node_js:
- "0.12"
- "0.10"
- "iojs"

- 6
- 8
- 10
- 11
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This changelog follows Semantic Versioning https://semver.org/

# 0.4.0 (2018-11-03)

### Minor

* Added CHANGELOG.md @rwky
* Updated travis to use node 6, 8, 10 and 11 @rwky
* Updated dev deps @rwky
* Fixed deprecation with Buffer @rwky
* Updated README.md and package.json for passport-next org @rwky
20 changes: 0 additions & 20 deletions CONTRIBUTING.md

This file was deleted.

1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(The MIT License)

Copyright (c) 2018 Rowan Wookey
Copyright (c) 2011-2013 Jared Hanson

Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

31 changes: 9 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Passport-HTTP

HTTP Basic and Digest authentication strategies for [Passport](https://github.com/jaredhanson/passport).
[![NPM version](https://img.shields.io/npm/v/@passport-next/passport-http.svg)](https://www.npmjs.com/package/@passport-next/passport-http)
[![Build Status](https://travis-ci.org/passport-next/passport-http.svg?branch=master)](https://travis-ci.org/passport-next/passport-http)
[![Coverage Status](https://coveralls.io/repos/github/passport-next/passport-http/badge.svg?branch=master)](https://coveralls.io/github/passport-next/passport-http?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/a5614edd33ca5e08e641/maintainability)](https://codeclimate.com/github/passport-next/passport-http/maintainability)
[![Dependencies](https://david-dm.org/passport-next/passport-http.png)](https://david-dm.org/passport-next/passport-http)
<!--[![SAST](https://gitlab.com/passport-next/passport-http/badges/master/build.svg)](https://gitlab.com/passport-next/passport-http/badges/master/build.svg)-->

HTTP Basic and Digest authentication strategies for [Passport](https://github.com/passport-next/passport).

This module lets you authenticate HTTP requests using the standard basic and
digest schemes in your Node.js applications. By plugging into Passport, support
for these schemes can be easily and unobtrusively integrated into any
application or framework that supports [Connect](http://www.senchalabs.org/connect/)-style
middleware, including [Express](http://expressjs.com/).

---

<p align="center"><a href="http://www.tkqlhce.com/click-8907558-13433666" target="_top">1Password, the only password manager you should trust.</a> Industry-leading security and award winning design.</p>

---


## Install

$ npm install passport-http
$ npm install @passport-next/passport-http

## Usage of HTTP Basic

Expand Down Expand Up @@ -103,16 +103,3 @@ application:
#### Examples

For a complete, working example, refer to the [Digest example](https://github.com/passport/express-3.x-http-digest-example).

## Sponsorship

Passport is open source software. Ongoing development is made possible by
generous contributions from [individuals and corporations](https://github.com/jaredhanson/passport/blob/master/SPONSORS.md).
To learn more about how you can help keep this project financially sustainable,
please visit Jared Hanson's page on [Patreon](https://www.patreon.com/jaredhanson).

## License

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2011-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
4 changes: 2 additions & 2 deletions lib/passport-http/strategies/basic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Module dependencies.
*/
var passport = require('passport-strategy')
var passport = require('@passport-next/passport-strategy')
, util = require('util');


Expand Down Expand Up @@ -72,7 +72,7 @@ BasicStrategy.prototype.authenticate = function(req) {
if (parts.length < 2) { return this.fail(400); }

var scheme = parts[0]
, credentials = new Buffer(parts[1], 'base64').toString().split(':');
, credentials = Buffer.from(parts[1], 'base64').toString().split(':');

if (!/Basic/i.test(scheme)) { return this.fail(this._challenge()); }
if (credentials.length < 2) { return this.fail(400); }
Expand Down
2 changes: 1 addition & 1 deletion lib/passport-http/strategies/digest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Module dependencies.
*/
var passport = require('passport-strategy')
var passport = require('@passport-next/passport-strategy')
, crypto = require('crypto')
, util = require('util');

Expand Down
124 changes: 124 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 26 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
{
"name": "passport-http",
"version": "0.3.0",
"name": "@passport-next/passport-http",
"version": "0.4.0",
"description": "HTTP Basic and Digest authentication strategies for Passport.",
"keywords": ["passport", "http", "basic", "digest", "auth", "authn", "authentication"],
"keywords": [
"passport",
"http",
"basic",
"digest",
"auth",
"authn",
"authentication"
],
"repository": {
"type": "git",
"url": "git://github.com/jaredhanson/passport-http.git"
"url": "git://github.com/passport-next/passport-http.git"
},
"bugs": {
"url": "http://github.com/jaredhanson/passport-http/issues"
"url": "http://github.com/passport-next/passport-http/issues"
},
"author": {
"name": "Jared Hanson",
"email": "[email protected]",
"url": "http://www.jaredhanson.net/"
"name": "Rowan Wookey",
"email": "[email protected]"
},
"licenses": [ {
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
} ],
"license": "MIT",
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"main": "./lib/passport-http",
"dependencies": {
"passport-strategy": "1.x.x"
"@passport-next/passport-strategy": "1.x.x"
},
"devDependencies": {
"vows": "0.8.x"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js test/**/*-test.js"
},
"engines": { "node": ">= 0.4.0" }
"engines": {
"node": ">=6"
}
}

0 comments on commit 0a966a7

Please sign in to comment.