mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Fix missing success and fail hooks
This commit is contained in:
Vendored
+2
-3
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
|
||||
import passport = require('passport');
|
||||
import { Strategy as PassportStrategy } from 'passport-strategy';
|
||||
import express = require('express');
|
||||
|
||||
interface IStrategyOptions {
|
||||
@@ -34,11 +34,10 @@ interface VerifyFunction {
|
||||
(username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
|
||||
}
|
||||
|
||||
declare class Strategy implements passport.Strategy {
|
||||
declare class Strategy extends PassportStrategy {
|
||||
constructor(options: IStrategyOptionsWithRequest, verify: VerifyFunctionWithRequest);
|
||||
constructor(options: IStrategyOptions, verify: VerifyFunction);
|
||||
constructor(verify: VerifyFunction);
|
||||
|
||||
name: string;
|
||||
authenticate: (req: express.Request, options?: Object) => void;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ interface IUser {
|
||||
username: string;
|
||||
}
|
||||
|
||||
const testingLocalStrategy = new local.Strategy(()=>{});
|
||||
testingLocalStrategy.success = () => {};
|
||||
testingLocalStrategy.fail = () => {};
|
||||
|
||||
class User implements IUser {
|
||||
public username: string;
|
||||
public password: string;
|
||||
|
||||
Reference in New Issue
Block a user