
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Zum Js v2 is a version without njwt dependency. Outgoing data relies on https security as is the normal internet standard, rather than being encoded into tokens. Before using these modules install and require the library
npm install zumjs-v2
const zum = require('zumjs-v2')
This is a required module for the client to interact with the zum server. It configures the client with the necessary details like appName and server endpoints. No other module will work unless the client is configured.
zum.configure({
// all values default to null unless specified
})
These values can be passed inside the configuration object to undertake various operations using the library
zum.configure({
appName : 'myapp',
register: 'http://www.myapp.com/register',
login: 'http://www.myapp.com/login',
verify: 'http://www.myapp.com/verify',
users: 'http://www.myapp.com/users',
mk: 'http://www.myapp.com/mk'
});
Create a new user. User will need to verify the email address before signing in, unless verified flag is set to true
zum.register(claims, callback)
zum.register({
username : 'zaygo',
password : 'Mypass@123',
name : 'Arjun Nair',
email : 'zaygo@myemail.com',
scope : 'admin',
country : 'Austria',
verified : false
}, (err, res) => {
if (err) throw err;
console.log(res.status); // successful if status is 200
});
Acquire access token for a user
zum.login(username, password, callback)
zum.login('zaygo', 'Mypass@123', (err,res) => {
if (err) throw err;
console.log(res.status); // successful if status is 200
console.log(res.headers['x-auth-token']); // access token can be found inside the response header
});
Update user account
zum.update(username, update_object, callback)
zum.update('zaygo', {
name : 'Zaygo',
country : 'Germany'
}, (err,res) => {
if (err) throw err;
console.log(res.status); // successful if status is 200
});
Delete user account. User will receive an email.
zum.terminate(username, delete_object, callback)
Fetch user details using the username or email
zum.fetchUser(user, callback)
Get raw server stats of the zum server. Currently provides cpu, memory and disk stats.
zum.serverStats(callback)
Callback will contain :
Get general user stats
zum.userStats(callback)
Callback will contain :
Disable a user for a certain number of days or manually re-enable a disabled user. The user will receive an email.
zum.disable(username, days, reason, callback)
zum.enable(username, callback)
zum.disable('arjun', 7, 'You violated rule 4', (err,res) => {
if (err) throw err;
console.log(res.status);
});
zum.enable('arjun', (err,res) => {
if (err) throw err;
console.log(res.status);
});
Verify access token
zum.verify(username, token, callback)
Login using otp
zum.otpLogin(receiver, callback)
Check the validity of otp
zum.verifyOtp(receiver, otp, callback)
Logs out the user and invalidates the access token
zum.logout(username, callback)
FAQs
Javascript library for interacting with zum server
We found that zumjs-v2 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.