// Type definitions for passport-http-bearer 1.0.1 // Project: https://github.com/jaredhanson/passport-http-bearer // Definitions by: Isman Usoh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// /// import passport = require("passport"); import express = require("express"); interface IStrategyOptions { scope?: string | Array; realm?: string; passReqToCallback?: boolean; header?: string; param?: string } interface IVerifyOptions { message?: string; scope: string | Array; } interface VerifyFunction { (token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void; } interface VerifyFunctionWithRequest { (req: express.Request, token: string, done: (error: any, user?: any, options?: IVerifyOptions | string) => void): void; } declare class Strategy implements passport.Strategy { constructor(verify: VerifyFunction); constructor(options: IStrategyOptions, verify: VerifyFunction); constructor(options: IStrategyOptions, verify: VerifyFunctionWithRequest); name: string; authenticate(req: express.Request, options?: Object): void; }