express-user
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "express-user", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Ressource Oriented Express Middleware to Manage Users.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -157,2 +157,3 @@ Express-User | ||
res.locals.ExpressUser.User: should contain the fields identifying the user to modify | ||
res.locals.ExpressUser.Update: Should contain the new values of fields that are to be modified | ||
@@ -183,2 +184,3 @@ | ||
res.locals.ExpressUser.User: should contain the fields identifying the user to modify | ||
res.locals.ExpressUser.Membership: the membership you wish to add | ||
@@ -189,2 +191,3 @@ | ||
res.locals.ExpressUser.User: should contain the fields identifying the user to modify | ||
res.locals.ExpressUser.Membership: the membership you wish to remove | ||
@@ -195,2 +198,3 @@ | ||
res.locals.ExpressUser.User: should contain the fields identifying the user to modify | ||
res.locals.ExpressUser.Update: Should contain the new values of fields that are to be modified | ||
@@ -241,6 +245,4 @@ | ||
If no error was encountered while manipulating the store, but the user was not found, an error route will be triggered with Err.Source having the value of 'ExpressUser' and Err.Type having the value of 'NoUser'. | ||
The count of users satisfying the selection (numerical primitive) is stored in the property res.locals.ExpressUser.Result. | ||
Otherwise, the count of users satisfying the selection (numerical primitive) is stored in the property res.locals.ExpressUser.Result. | ||
- PUT /User/Self/Memberships/:Membership and PUT /User/:Field/:ID/Memberships/:Membership | ||
@@ -282,4 +284,2 @@ | ||
TO FINISH | ||
Dependencies | ||
@@ -294,4 +294,2 @@ ============ | ||
- A route to handle sessions that will initialize the req.session attribute. The express-session project will do this for you. | ||
- For an "out of the box" solution, you'll also need a validator and a responder. express-user-local and express-user-local-basic can provide those for you for local authentication. | ||
@@ -301,2 +299,17 @@ | ||
[1] If it doesn't work for later version, please let me know. | ||
Session Dependency | ||
------------------ | ||
The library provides optional session support in 3 ways: | ||
- Session route to synchronize a user's profile with the user information in his session | ||
- A PUT /Session/Self/User for session-based login | ||
- A DELETE /Session/Self/User for session-based logout | ||
For session support to work, you need either the express-session library or another that behaves in the following manner: req.session is defined and manipulating it results in persistent session changes. | ||
Note that the remainder of this library is not dependent on your using its session support so you opt not to use it and still use the rest of the library. You simply need not to handle the session routes in your validator and express-user will trigger an error handler when those routes are encountered, which you can deal with in your validator (and maybe return 404). | ||
Security Note About Validator | ||
@@ -335,2 +348,4 @@ ============================= | ||
For those using session functionality provided by express-user: | ||
For a smooth seemless functionality to users, sessions and user accounts they point to need to be in sync, such that when accounts are updated or deleted, this is reflected in sessions pointing to it. | ||
@@ -369,2 +384,7 @@ | ||
1.0.3 | ||
----- | ||
Documentation improvements: Corrected incorrect information for counting error and clarified session dependencies. | ||
1.0.2 | ||
@@ -371,0 +391,0 @@ ----- |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
505
133112
12