File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11node_modules
22* .log
3+ server.js
Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ The middleware will now check incoming requests to match the credentials
1919
2020## How it behaves
2121
22+ The middleware will check incoming requests for a basic auth (` Authorization ` )
23+ header, parse it and check if the credentials are legit.
24+
25+ ** If a request is found to not be authorized** , it will respond with HTTP 401 and an empty body.
26+
27+ ** If a request is successfully authorized** , an ` auth ` property will be added to the request,
28+ containing an object with ` user ` and ` password ` properties, filled with the credentials.
29+
2230If you simply want to check basic auth against one or multiple static credentials,
2331you can simply pass the credentials as in the example above:
2432
You can’t perform that action at this time.
0 commit comments