dms-middleware-auth 1.0.1 → 1.0.2
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/dist/auth.middleware.js
CHANGED
|
@@ -101,7 +101,10 @@ let AuthMiddleware = class AuthMiddleware {
|
|
|
101
101
|
|
|
102
102
|
// Attach attributes to request
|
|
103
103
|
userAttributes = JSON.parse(userAttributes);*/
|
|
104
|
-
req['
|
|
104
|
+
req['user'] = {
|
|
105
|
+
role: role,
|
|
106
|
+
userName: decoded.payload.email
|
|
107
|
+
};
|
|
105
108
|
// req['attributes'] = {
|
|
106
109
|
// client: clientAttributes[req.originalUrl],
|
|
107
110
|
// // user: userAttributes,
|
package/package.json
CHANGED
package/src/auth.middleware.ts
CHANGED
|
@@ -72,7 +72,11 @@ export class AuthMiddleware implements NestMiddleware {
|
|
|
72
72
|
|
|
73
73
|
// Attach attributes to request
|
|
74
74
|
userAttributes = JSON.parse(userAttributes);*/
|
|
75
|
-
req['
|
|
75
|
+
req['user'] = {
|
|
76
|
+
role: role,
|
|
77
|
+
userName:decoded.payload.email
|
|
78
|
+
};
|
|
79
|
+
|
|
76
80
|
// req['attributes'] = {
|
|
77
81
|
// client: clientAttributes[req.originalUrl],
|
|
78
82
|
// // user: userAttributes,
|