@wdalmut/basic-auth
v0.0.1
Published
Basic Authentication layer for @wdalmut/mini-auth
Downloads
50
Readme
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))