jovo-plugin-auth
v3.6.1
Published
* [Installation](#installation) * [Customization](#customization)
Readme
Jovo Auth Integration
Installation
npm install --save jovo-plugin-authUsage in the app:
const { ApiKey } = require('jovo-plugin-auth');
app.use(
new ApiKey({
'x-api-key': 'foobar'
})
);There are two ways to pass the key to the app:
Via header object:
{
'x-api-key': 'foobar'
}Via query param:
https://endpoint.example.com/user?x-api-key=foobarCustomization
If you want to pass your custom api key variable name, use customKeyName and customKeyValue
const { ApiKey } = require('jovo-plugin-auth');
app.use(
new ApiKey({
'customKeyName': 'apiKey'
'customKeyValue': 'foobar'
})
);