@rainder/koa-basic-auth
v2.0.0
Published
Koa Basic Auth
Downloads
13
Readme
koa-basic-auth
import * as Koa from 'koa';
import { KoaBasicAuth } from '@rainder/koa-basic-auth';
const app = new Koa();
app.use(KoaBasicAuth.middleware({
john: 'smith',
igor: 'danutov'
}));
Support for password hashing algorithm
import { KoaBasicAuth } from '@rainder/koa-basic-auth';
app.use(KoaBasicAuth.middleware({
john: 'a66e44736e753d4533746ced572ca821',
igor: 'e98ef4146865a8ccaca773182be30990'
}, {
hashingAlgorithm: 'md5',
}));