Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
http-auth-hapi
Advanced tools
Hapi framework integration with http-auth module.
Via git (or downloaded tarball):
$ git clone git://github.com/http-auth/http-auth-hapi.git
Via npm:
$ npm install http-auth-hapi
// Authentication module.
// eslint-disable-next-line node/no-unpublished-require
const auth = require("http-auth");
// Setup auth.
const basic = auth.basic({
realm: "Simon Area.",
file: __dirname + "/../data/users.htpasswd"
});
// eslint-disable-next-line node/no-unpublished-require
const Hapi = require("@hapi/hapi");
const init = async () => {
const server = Hapi.server({
port: 1337,
host: "localhost"
});
// Register auth plugin.
await server.register(require("http-auth-hapi"));
// Setup strategy.
server.auth.strategy("http-auth", "http-auth", basic);
server.auth.default("http-auth");
server.route({
method: "GET",
path: "/",
handler: request => {
return `Welcome from Hapi - ${request.auth.credentials.name}!`;
}
});
await server.start();
console.log("Server running on %s", server.info.uri);
};
init();
It uses mocha, so just run following command in package directory:
$ npm test
The MIT License (MIT)
FAQs
Hapi framework integration with http-auth module.
We found that http-auth-hapi 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.