Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.1.0 #9

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# basic-auth-connect

Connect's Basic Auth middleware in its own module. This module is considered deprecated. You should instead create your own middleware with [basic-auth](https://github.com/visionmedia/node-basic-auth).
Connect's Basic Auth middleware in its own module. You should consider to create your own middleware with [basic-auth](https://github.com/visionmedia/node-basic-auth).

## API

```js
var basicAuth = require('basic-auth-connect');
```

Sorry, couldn't think of a more clever name.

Simple username and password

```js
Expand All @@ -28,13 +26,17 @@ connect()

Async callback verification, accepting `fn(err, user)`.

```
```js
connect()
.use(basicAuth(function(user, pass, fn){
User.authenticate({ user: user, pass: pass }, fn);
}))
```

**Security Considerations**

Important: When using the callback method, it is recommended to use a time-safe comparison function like [crypto.timingSafeEqual](https://nodejs.org/api/crypto.html#cryptotimingsafeequala-b) to prevent timing attacks.

## License

[MIT](./LICENSE)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "basic-auth-connect",
"description": "Basic auth middleware for node and connect",
"version": "1.0.0",
"version": "1.1.0",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
Expand Down