http-auth-koa
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -21,3 +21,3 @@ "use strict"; | ||
if (err) { | ||
next(err); | ||
throw err; | ||
} else { | ||
@@ -24,0 +24,0 @@ next(); |
{ | ||
"name": "http-auth-koa", | ||
"description": "Node.js package for HTTP basic and digest access authentication.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Gevorg Harutyunyan (http://github.com/gevorg)", | ||
@@ -6,0 +6,0 @@ "maintainers": [ |
@@ -34,9 +34,10 @@ # http-auth-koa | ||
// Setup auth. | ||
app.use(koaAuth(basic)); | ||
// Setup basic handler. | ||
app.use(async ctx => { | ||
ctx.body = `Welcome to koa ${ctx.request.user}!`; | ||
await next(); | ||
ctx.body = `Welcome to koa ${ctx.req.user}!`; | ||
}); | ||
// Setup auth. | ||
app.use(koaAuth(basic)); | ||
``` | ||
@@ -43,0 +44,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7697
93