Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-user

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-user - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1-alpha.1

2

example/Example.js

@@ -71,3 +71,3 @@ //Copyright (c) 2015 Eric Vallee <eric_vallee2003@yahoo.ca>

//Probably another questionable one to put in a production environment for regular users
App.get('/Session/User', function(Req, Res, Next) {
App.get('/Session/Self/User', function(Req, Res, Next) {
if(Req.session.User)

@@ -74,0 +74,0 @@ {

@@ -26,3 +26,3 @@ //Copyright (c) 2015 Eric Vallee <eric_vallee2003@yahoo.ca>

Method = 'PUT';
URL = '/Session/User';
URL = '/Session/Self/User';
}

@@ -32,3 +32,3 @@ else if(Section=='Logout')

Method = 'DELETE';
URL = '/Session/User';
URL = '/Session/Self/User';
}

@@ -49,3 +49,3 @@ else if(Section=='Add')

{
URL = '/User/Email/'+Data['UrlUsername'];
URL = '/User/Email/'+Data['UrlEmail'];
}

@@ -92,3 +92,3 @@ else

Method = 'GET';
URL = '/Session/User';
URL = '/Session/Self/User';
}

@@ -95,0 +95,0 @@ else if(Section=='Elevate')

@@ -195,3 +195,3 @@ //Copyright (c) 2015 Eric Vallee <eric_vallee2003@yahoo.ca>

Router.use('/User', ConnectionCheckGenerator(ConnectionSecurity));
Router.use('/Session/User', ConnectionCheckGenerator(ConnectionSecurity));
Router.use('/Session/Self/User', ConnectionCheckGenerator(ConnectionSecurity));
}

@@ -243,4 +243,4 @@

Router.put('/Session/User', MainRoutes.SessionUserPUT(UserStore));
Router.delete('/Session/User', MainRoutes.SessionUserDELETE(UserStore));
Router.put('/Session/Self/User', MainRoutes.SessionUserPUT(UserStore));
Router.delete('/Session/Self/User', MainRoutes.SessionUserDELETE(UserStore));

@@ -296,9 +296,1 @@ if(Callback)

// POST /Users -> Registration
// PATCH /Users/Self or ID -> Modify account of logged in user
// DELETE /Users/Self or ID -> Delete account of logged in user
// GET /Users/Self or ID -> Get user account of logged in user
// PUT /Session/User -> Login
// DELETE /Session/User -> Logout
{
"name": "express-user",
"version": "0.0.0",
"version": "0.0.1-alpha.1",
"description": "Ressource Oriented Express Middleware to Manage Users.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -19,4 +19,2 @@ Express-User

- Strongly considering changing the URLs for Login and Logout from '/Session/User' to '/Session/Self/User' to clarify that the ressource being operated on is the requester's own session.
Known Bug(s)

@@ -32,14 +30,14 @@ ============

Universal URLs:
POST /Users -> Account creation
PATCH /User/Self -> Account modification (using session to identify the account)
DELETE /User/Self -> Account deletion (using session to identify the account)
GET /User/Self -> Fetching account info (using session to identify the account)
PUT /Session/User -> Login
DELETE /Session/User -> Logout
1) Universal URLs:
- POST /Users -> Account creation
- PATCH /User/Self -> Account modification (using session to identify the account)
- DELETE /User/Self -> Account deletion (using session to identify the account)
- GET /User/Self -> Fetching account info (using session to identify the account)
- PUT /Session/Self/User -> Login
- DELETE /Session/Self/User -> Logout
Admin URLs:
PATCH /User/:Field/:ID -> Account modification (using the ID of the given Field to identify the account)
DELETE /User/:Field/:ID -> Account deletion (using the ID of the given Field to identify the account)
GET /User/:Field/:ID -> Fetching account info (using the ID of the given Field to identify the account)
2) Admin URLs:
- PATCH /User/:Field/:ID -> Account modification (using the ID of the given Field to identify the account)
- DELETE /User/:Field/:ID -> Account deletion (using the ID of the given Field to identify the account)
- GET /User/:Field/:ID -> Fetching account info (using the ID of the given Field to identify the account)

@@ -54,4 +52,7 @@ Architecture

-secure connection checking (HTTPS or local)
-Access control: privilege check to ensure the admin URLs are accessed by an admin and that the user is logged in when accessing the Self URLs
-Handle accout manipulation
-Provide a routing callback for authentication (to check the user is either logged in or belongs to a given group)

@@ -139,1 +140,16 @@

More in-depth details to come once the API is finalized.
Versions History
================
0.0.0
-----
Initial prototype
0.0.1-alpha.1
-------------
Doc formating fix.
Changed session management URL from /Session/User to /Session/Self/User

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc