@eienjs/adonisjs-simple-auth
v2.1.1
Published
Single API key authentication for AdonisJS v7 applications
Maintainers
Readme
@eienjs/adonisjs-simple-auth
Single authentication key that allows authenticate on your adonisjs v7 application
Introduction
This package enables you to create a single authentication key that allows you to authenticate just by including the key. This simplicity also allows a user to make calls easily, with cURL, with interactive docs, or even in their browser.
Quick Start
Install the package from npm using the following command:
node ace add @eienjs/adonisjs-simple-authAutomatically the command will register the provider and the command. You will be able to use the package immediately. Now you need run the command to generate your api key
node ace generate:api-keySo, protect your routes with the following middleware
import router from '@adonisjs/core/services/router';
import { middleware } from '#start/kernel';
/// ...other routes
router.get('/', () => 'Hello World').use(middleware.apiKey());Documentation
The documentation is available on EienJS.
Contributing
Contributions are welcome. Please read CONTRIBUTING for more details and remember to check the CHANGELOG file.
Copyright and License
The @eienjs/adonisjs-simple-auth library is licensed for use under the MIT License (MIT). Please see LICENSE for more information.
