1.0.0 • Published 2 years ago

epyc-basic-auth v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

epyc-basic-auth

HTTP basic authentication middelware for epyc.

Read more about HTTP authentication.

Installation

Use npm or yarn to install epyc.

npm i epyc-basic-auth

Usage

const app = require("epyc");
const isAuthenticated = require('epyc-basic-auth');

app.get('/', 
    isAuthenticated(({ username, password }) => username === 'John' && password === 'Doe') 
    (request, response) => response.send('Hello World')
);

app.bootstrap(8080);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

EPYC_MIT

AUTH_MIT