forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
passport-twitter.d.ts
42 lines (33 loc) · 1.25 KB
/
passport-twitter.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
34
35
36
37
38
39
40
41
42
// Type definitions for passport-facebook 1.0.3
// Project: https://github.com/jaredhanson/passport-facebook
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../passport/passport.d.ts"/>
declare module 'passport-twitter' {
import passport = require('passport');
import express = require('express');
interface Profile extends passport.Profile {
gender: string;
username: string;
_raw: string;
_json: any;
_accessLevel: string;
}
interface IStrategyOption {
consumerKey: string;
consumerSecret: string;
callbackURL: string;
reguestTokenURL?: string;
accessTokenURL?: string;
userAuthorizationURL?: string;
sessionKey?: string;
userProfileURL?: string;
skipExtendedUserProfile?: boolean;
}
class Strategy implements passport.Strategy {
constructor(options: IStrategyOption,
verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);
name: string;
authenticate: (req: express.Request, options?: Object) => void;
}
}