npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dbeauyat/users

v1.0.5

Published

Module Node.js pour la gestion d'utilisateurs avec stockage Redis et hachage Argon2.

Readme

@dbeauyat/users

Module Node.js pour la gestion d'utilisateurs avec stockage Redis et hachage Argon2.

Installation

npm install @dbeauyat/users

Configuration

Le module charge automatiquement config.json5 au démarrage. Les paramètres principaux :

| Paramètre | Type | Description | |-----------|------|-------------| | brokerUrl | string | URL du broker MQTT (ex: mqtt://127.0.0.1:1883) | | listenTopic | string | Topic pour les nouvelles demandes d'authentification | | qos | number | QoS du broker MQTT | | clientId | string | Identifiant client du broker | | DBs.redis.host | string | Host Redis (défaut: 127.0.0.1) | | DBs.redis.port | number | Port Redis (défaut: 6379) | | DBs.redis.username | string | Username Redis | | DBs.redis.password | string | Password Redis |

Usage

import { createUser, retrieveUser, verifyPassword } from '@dbeauyat/users';

// Créer un utilisateur
await createUser('alice', 'motdepasse', 'Alice Dupont', true);

// Récupérer un utilisateur
const user = await retrieveUser('alice');

// Vérifier un mot de passe
const valid = await verifyPassword('alice', 'motdepasse');

API

createUser(username, password, fullname, enabled)

Crée un nouvel utilisateur. Le mot de passe est haché avec Argon2.

| Paramètre | Type | Obligatoire | Description | |-----------|------|-------------|-------------| | username | string | Oui | Nom d'utilisateur unique | | password | string | Oui | Mot de passe (haché automatiquement) | | fullname | string | Oui | Nom complet | | enabled | boolean | Non | État initial (défaut: true) |

Retourne { success: true, username }.

retrieveUser(username)

Récupère les informations d'un utilisateur.

| Paramètre | Type | Description | |-----------|------|-------------| | username | string | Nom d'utilisateur |

Retourne un objet utilisateur ou null si non trouvé.

verifyPassword(username, password)

Vérifie qu'un mot de passe correspond au hachage stocké.

| Paramètre | Type | Description | |-----------|------|-------------| | username | string | Nom d'utilisateur | | password | string | Mot de passe à vérifier |

Retourne { valid: true } ou { valid: false, reason: 'USER_NOT_FOUND' \| 'WRONG_PASSWORD' }.

updateUser(username, updates)

Met à jour un champ ou plusieurs champs d'un utilisateur.

| Paramètre | Type | Description | |-----------|------|-------------| | username | string | Nom d'utilisateur | | updates | object | Objet clé-valeur des champs à mettre à jour |

Retourne { success: true }.

updatePassword(username, newPassword)

Change le mot de passe d'un utilisateur. Le nouveau mot de passe est haché avec Argon2.

| Paramètre | Type | Description | |-----------|------|-------------| | username | string | Nom d'utilisateur | | newPassword | string | Nouveau mot de passe |

Retourne { success: true }.

deleteUser(username)

Supprime un utilisateur.

| Paramètre | Type | Description | |-----------|------|-------------| | username | string | Nom d'utilisateur à supprimer |

Retourne { success: true }.

enableUser(username) / disableUser(username)

Active ou désactive un utilisateur.

| Paramètre | Type | Description | |-----------|------|-------------| | username | string | Nom d'utilisateur |

Retourne { success: true }.

Stockage

Les données sont stockées dans Redis au format JSON sous la clé fimecov2:ba:users:<username>.

Licence

ISC