forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassport-local.d.ts
33 lines (25 loc) · 996 Bytes
/
passport-local.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Type definitions for passport-local 1.0.0
// Project: https://github.com/jaredhanson/passport-local
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../passport/passport.d.ts"/>
declare module 'passport-local' {
import passport = require('passport');
import express = require('express');
interface IStrategyOptions {
usernameField?: string;
passwordField?: string;
}
interface IVerifyOptions {
message: string;
}
interface VerifyFunction {
(username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
}
class Strategy implements passport.Strategy {
constructor(options: IStrategyOptions, verify: VerifyFunction);
constructor(verify: VerifyFunction);
name: string;
authenticate: (req: express.Request, options?: Object) => void;
}
}