@rainder/koa-basic-auth
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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',
}));

Readme

Keywords

Package Sidebar

Install

npm i @rainder/koa-basic-auth

Weekly Downloads

0

Version

2.0.0

License

ISC

Unpacked Size

23.1 kB

Total Files

12

Last publish

Collaborators

  • rainder