
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@types/passport-http-bearer
Advanced tools
TypeScript definitions for passport-http-bearer
npm install --save @types/passport-http-bearer
This package contains type definitions for passport-http-bearer (https://github.com/jaredhanson/passport-http-bearer).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-http-bearer.
/// <reference types="passport"/>
/// <reference types="express" />
/// <reference types="koa" />
import passport = require("passport");
import express = require("express");
import koa = require("koa");
interface IStrategyOptions {
scope?: string | string[] | undefined;
realm?: string | undefined;
passReqToCallback?: boolean | undefined;
}
interface IVerifyOptions {
message?: string | undefined;
scope?: string | string[];
}
interface VerifyFunction {
(token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void;
}
interface IKoaContextContainer {
ctx: koa.Context;
}
type KoaPassportExpressRequestMock = Partial<express.Request> & IKoaContextContainer;
interface VerifyFunctionWithRequest {
(
req: express.Request,
token: string,
done: (error: any, user?: any, options?: IVerifyOptions | string) => void,
): void;
}
interface VerifyFunctionWithContext {
(
req: KoaPassportExpressRequestMock,
token: string,
done: (error: any, user?: any, options?: IVerifyOptions | string) => void,
): void;
}
type VerifyFunctions =
| VerifyFunction
| VerifyFunctionWithRequest
| VerifyFunctionWithContext;
declare class Strategy<T extends VerifyFunctions> implements passport.Strategy {
constructor(verify: VerifyFunction);
constructor(options: IStrategyOptions, verify: T);
name: string;
authenticate(req: express.Request, options?: Object): void;
}
These definitions were written by Isman Usoh.
FAQs
TypeScript definitions for passport-http-bearer
The npm package @types/passport-http-bearer receives a total of 206,795 weekly downloads. As such, @types/passport-http-bearer popularity was classified as popular.
We found that @types/passport-http-bearer demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.