Skip to content

Commit

Permalink
documented that req.auth is added regardless of approval
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Strauss committed Oct 18, 2016
1 parent 9b8c887 commit 08a7cc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ The middleware will now check incoming requests to match the credentials
`admin:supersecret`.

The middleware will check incoming requests for a basic auth (`Authorization`)
header, parse it and check if the credentials are legit.
header, parse it and check if the credentials are legit. If there are any
credentials, an `auth` property will be added to the request, containing
an object with `user` and `password` properties, filled with the credentials,
no matter if they are legit or not.

**If a request is found to not be authorized**, it will respond with HTTP 401
and a configurable (default empty) body.

**If a request is successfully authorized**, an `auth` property will be added to the request,
containing an object with `user` and `password` properties, filled with the credentials.

### Static Users

If you simply want to check basic auth against one or multiple static credentials,
Expand Down

0 comments on commit 08a7cc6

Please sign in to comment.