Add definitions for passport-local module

This commit is contained in:
SomaticIT
2014-09-15 00:03:57 +02:00
parent 50dd84eb5d
commit d0227b9c72
+33
View File
@@ -0,0 +1,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;
}
}