0.0.1 • Published 6 years ago

@wdalmut/basic-auth v0.0.1

Weekly downloads
280
License
MIT
Repository
github
Last release
6 years ago

Basic Authentication layer for @wdalmut/mini-auth

A simple authentication layer for basic auth

npm install --save @wdalmut/basic-auth

Usage

basic(res)((username, password) => {
  return Promise.resolve({id: 1, ...})
})

Usage with @wdalmut/mini-auth

// just an example
const fromDB = (username, password) => {
  return User.find(/*...*/),
};

auth(basic(fromDb))