You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

koa-auth-basic

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-auth-basic - npm Package Compare versions

Comparing version

to
1.1.0

11

index.js

@@ -28,8 +28,11 @@ 'use strict'

if (credentials && checkCredentials(credentials.name, credentials.pass)) {
await next()
} else {
ctx.throw(401)
if (credentials) {
const valid = await Promise.resolve(checkCredentials(credentials.name, credentials.pass))
if (valid) {
await next()
return
}
}
ctx.throw(401)
}
}
{
"name": "koa-auth-basic",
"version": "1.0.0",
"version": "1.1.0",
"description": "Koa basic auth middleware with custom credential check",

@@ -13,3 +13,4 @@ "repository": "kbrgl/koa-auth-basic",

"basicauth",
"basic auth"
"basic auth",
"middleware"
],

@@ -16,0 +17,0 @@ "files": [