@nitra/cf-security 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/jwt.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/cf-security",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "check header in serverless",
5
5
  "type": "module",
6
6
  "exports": {
package/src/jwt.js CHANGED
@@ -5,7 +5,8 @@ import { isDev } from '@nitra/isenv'
5
5
  * Check request for Nitra security rules WI
6
6
  *
7
7
  * @param {object} req - Fastify Request for check
8
- * @return {string} token if check passed
8
+ * @param {Array} allowedRoles - Allowed roles
9
+ * @return {Promise<string>} token if check passed
9
10
  */
10
11
  export default async (req, allowedRoles) => {
11
12
  // Для дева можна й не передавати токен