Add support for 'passReqToCallback' to passport-local

When 'passReqToCallback' is true, 'req' will be passed as the first argument to the verify callback.
This commit is contained in:
AndreasGassmann
2015-04-07 08:10:50 +02:00
parent 65ea56c919
commit 8e701011b8
+2
View File
@@ -13,6 +13,7 @@ declare module 'passport-local' {
interface IStrategyOptions {
usernameField?: string;
passwordField?: string;
passReqToCallback?: boolean;
}
interface IVerifyOptions {
@@ -20,6 +21,7 @@ declare module 'passport-local' {
}
interface VerifyFunction {
(req: express.Request, username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
(username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
}