Skip to content

Commit e06a9b6

Browse files
author
Leon Strauss
committed
changed async to authorizeAsync
1 parent bdefea0 commit e06a9b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ This will authorize all requests with credentials where the username begins with
4848
likely look up some data instead ;-)
4949

5050
Note that the `authorizer` function is expected to be synchronous here. This is
51-
the default behavior, you can pass `async: true` in the options object to indicate
51+
the default behavior, you can pass `authorizeAsync: true` in the options object to indicate
5252
that your authorizer is asynchronous. In this case it will be passed a callback
5353
as the third parameter, which is expected to be called by standard node convention
5454
with an error and a boolean to indicate if the credentials have been approved or not.
5555
Let's look at the same authorizer again, but this time asynchronous:
5656

5757
app.use(basicAuth({
5858
authorizer: myAsyncAuthorizer,
59-
async: true
59+
authorizeAsync: true
6060
}));
6161

6262
function myAsyncAuthorizer(username, password, cb) {

0 commit comments

Comments
 (0)