@types/passport-oauth2-client-password
Version:
TypeScript definitions for passport-oauth2-client-password
50 lines (38 loc) • 1.67 kB
Markdown
# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-oauth2-client-password/index.d.ts)
````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
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
* Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/passport](https://npmjs.com/package/@types/passport)
# Credits
These definitions were written by [Ivan Zubok](https://github.com/akaNightmare).