
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
authenticated-json-fetch-client
Advanced tools
A TypeScript base class for building clients for fetch-based JSON APIs that are authenticated by a secret given in a param or header.
A TypeScript base class for building clients for fetch-based JSON APIs that are authenticated by a secret given in a param or header.
yarn add authenticated-json-fetch-client
# OR
npm install --save authenticated-json-fetch-client
import API from 'authenticated-json-fetch-client;
interface User {
id: number;
username: string;
}
export class MyAPI extends API {
constructor(secret: string, host = 'http://localhost:8000') {
const secretParamName = 'token';
// To include the secret param as an HTTP header, set `secretParamName` to `"header:Some-Header"`
// (or set it to `"header:"` which defaults to `"header:Authorization"`)
super({host, secret, secretParamName});
}
getAllUsers(): Promise<User[]> {
return this.GET<User[]>('/users');
}
}
Copyright 2019 Duncan Smith
FAQs
A TypeScript base class for building clients for fetch-based JSON APIs that are authenticated by a secret given in a param or header.
We found that authenticated-json-fetch-client 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.