Installation
npm install --save @types/passport-oauth2-client-password
Summary
This package contains type definitions for passport-oauth2-client-password (https://github.com/jaredhanson/passport-oauth2-client-password).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-oauth2-client-password.
import * as express from "express";
import * as passport from "passport";
interface StrategyOptionsWithRequestInterface {
passReqToCallback: boolean;
}
interface VerifyFunctionWithRequest {
(
req: express.Request,
clientId: string,
clientSecret: string,
done: (error: any, client?: any, info?: any) => void,
): void;
}
interface VerifyFunction {
(clientId: string, clientSecret: string, done: (error: any, client?: any, info?: any) => void): void;
}
declare class Strategy extends passport.Strategy {
constructor(options: StrategyOptionsWithRequestInterface, verify: VerifyFunctionWithRequest);
constructor(verify: VerifyFunction);
name: string;
authenticate(req: express.Request, options?: {}): void;
}
Additional Details
Credits
These definitions were written by Ivan Zubok.