mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Seperate method between passReqToCallback and normal way
This commit is contained in:
Vendored
+23
-4
@@ -31,12 +31,31 @@ interface IStrategyOption {
|
||||
scopeSeparator?: string;
|
||||
enableProof?: boolean;
|
||||
profileFields?: string[];
|
||||
passReqToCallback?: boolean;
|
||||
}
|
||||
|
||||
interface IStrategyOptionWithRequest {
|
||||
clientID: string;
|
||||
clientSecret: string;
|
||||
callbackURL: string;
|
||||
|
||||
scopeSeparator?: string;
|
||||
enableProof?: boolean;
|
||||
profileFields?: string[];
|
||||
passReqToCallback: boolean;
|
||||
}
|
||||
|
||||
interface VerifyFunction {
|
||||
(accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void): void;
|
||||
}
|
||||
|
||||
interface VerifyFunctionWithRequest {
|
||||
(req: express.Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void): void;
|
||||
}
|
||||
|
||||
declare class Strategy implements passport.Strategy {
|
||||
constructor(options: IStrategyOption,
|
||||
verify: (req?: express.Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void);
|
||||
name: string;
|
||||
constructor(options: IStrategyOptionWithRequest, verify: VerifyFunctionWithRequest);
|
||||
constructor(options: IStrategyOption, verify: VerifyFunction);
|
||||
|
||||
name: string;
|
||||
authenticate: (req: express.Request, options?: Object) => void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user