not-node 6.3.8 → 6.3.9
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.
package/package.json
CHANGED
package/src/generic/form.list.js
CHANGED
package/src/identity/index.js
CHANGED
|
@@ -15,7 +15,7 @@ module.exports = class notAppIdentity {
|
|
|
15
15
|
/**
|
|
16
16
|
* Collects various authentification and authorization data from request object
|
|
17
17
|
* @param {import('../types').notNodeExpressRequest} req ExpressRequest
|
|
18
|
-
* @return {
|
|
18
|
+
* @return {import('../types').notAppIdentityData} various authentification data for actor { root:boolean, auth: boolean, role: [string], uid: ObjectId, sid: string, ip:string }
|
|
19
19
|
*/
|
|
20
20
|
static extractAuthData(req) {
|
|
21
21
|
const identity = this.#identity.of(req);
|
package/src/types.js
CHANGED
|
@@ -80,4 +80,17 @@
|
|
|
80
80
|
* @typedef {import('express').Request & notNodeExpressRequestProperties} notNodeExpressRequest
|
|
81
81
|
*/
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @typedef {object} notAppIdentityData
|
|
86
|
+
* @property {boolean} root //system configuration administrator
|
|
87
|
+
* @property {boolean} admin //system content administrator
|
|
88
|
+
* @property {boolean} auth //authenticated user
|
|
89
|
+
* @property {Array<string>} role //list of roles, exactly one should be primary role
|
|
90
|
+
* @property {string} primaryRole //primary role
|
|
91
|
+
* @property {string} uid //user identificator
|
|
92
|
+
* @property {string} sid //user session identificator
|
|
93
|
+
* @property {string} ip //request source ip
|
|
94
|
+
*/
|
|
95
|
+
|
|
83
96
|
module.exports = {};
|