@@ -25,7 +25,7 @@ header, parse it and check if the credentials are legit.
2525** If a request is successfully authorized** , an ` auth ` property will be added to the request,
2626containing an object with ` user ` and ` password ` properties, filled with the credentials.
2727
28- # Static Users
28+ ### Static Users
2929
3030If you simply want to check basic auth against one or multiple static credentials,
3131you can pass those credentials as in the example above:
@@ -41,7 +41,7 @@ you can pass those credentials as in the example above:
4141The middleware will check incoming requests to have a basic auth header matching
4242one of the three passed credentials.
4343
44- # Custom authorization
44+ ### Custom authorization
4545
4646Alternatively, you can pass your own ` authorizer ` function, to check the credentials
4747however you want. It will be called with a username and password and is expected to
@@ -57,7 +57,7 @@ This will authorize all requests with credentials where the username begins with
5757` 'A' ` and the password begins with ` 'secret' ` . In an actual application you would
5858likely look up some data instead ;-)
5959
60- # Custom Async Authorization
60+ ### Custom Async Authorization
6161
6262Note that the ` authorizer ` function above is expected to be synchronous. This is
6363the default behavior, you can pass ` authorizeAsync: true ` in the options object to indicate
@@ -78,7 +78,7 @@ Let's look at the same authorizer again, but this time asynchronous:
7878 return cb(null, false)
7979 }
8080
81- # Challenge
81+ ### Challenge
8282
8383Per default the middleware will not add a ` WWW-Authenticate ` challenge header to
8484responses of unauthorized requests. You can enable that by adding ` challenge: true `
0 commit comments