Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
mock-user-auth
Advanced tools
Mock-User-Auth is a mock user authentication API developed in Nodejs and Express using JWT as an authenticator
Mock-User-Auth is a mock user authentication API developed in Nodejs and Express using JWT as an authenticator using the ES6 version of JavaScript.
The use: It can be used to assist your front-end development. It's simple and fast, you just need to follow the steps below.
Toolkit: Node.js | Express.js | Mocha | Chai | Istanbul
$ npm i --save mock-user-auth
{
"script": {
"dev": "nodemon ./node_modules/mock-user-auth/bin/www.js"
}
}
Obs.: The following instructions were tested on Ubuntu distribution.
Action | Required | Method | URL |
---|---|---|---|
AUTHENTICATE USER | POST | /api/v1/auth | |
CREATE USER | POST | /api/v1/users | |
GET USER | Auth | GET | /api/v1/users |
PATCH USER | Auth | PATCH | /api/v1/users |
DELETE USER | Auth | DELETE | /api/v1/users |
DELETE ALL USERS | DELETE | /api/v1/users |
POST /api/v1/auth
{
"email": "user@gmail.com",
"password": "user123"
}
{
"token": "eyJhbGciOiJI..."
}
POST /api/v1/users
{
"name": "user",
"email": "user@gmail.com",
"password": "user123"
}
{
"message": "User registered with success",
"token": "eyJhbGciOiJI..."
}
GET /api/v1/users
const token = 'eyJhbGciOiJI...';
req.setRequestHeader('Authorization', token);
{
"id": 46643,
"name": "user",
"email": "user@gmail.com",
"password": "user123",
"imageUrl": "https://almsaeedstudio.com/themes/AdminLTE/dist/img/user2-160x160.jpg"
}
PATCH /api/v1/users
const token = 'eyJhbGciOiJI...';
req.setRequestHeader('Authorization', token);
{
"name": "newName",
"email": "new_email@gmail.com",
"password": "newpassword123"
}
{
"message": "User updated with success"
}
DELETE /api/v1/users
const token = 'eyJhbGciOiJI...';
req.setRequestHeader('Authorization', token);
{
"message": "User deleted with success"
}
DELETE /api/v1/all-users
{
"key_admin": "keyadmin123"
}
{
"message": "Users deleted with success"
}
This project is licensed under the MIT License - see the LICENSE.md file for details
Created By ThiagoLuizNunes 2019.
FAQs
Mock-User-Auth is a mock user authentication API developed in Nodejs and Express using JWT as authenticator
The npm package mock-user-auth receives a total of 11 weekly downloads. As such, mock-user-auth popularity was classified as not popular.
We found that mock-user-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.