@types/passport-oauth2-client-password
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

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.

index.d.ts

/// <reference types="passport"/>
/// <reference types="express"/>

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.

/@types/passport-oauth2-client-password/

    Package Sidebar

    Install

    npm i @types/passport-oauth2-client-password

    Weekly Downloads

    5,385

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    4.61 kB

    Total Files

    5

    Last publish

    Collaborators

    • types