forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
passport-google-oauth.d.ts
63 lines (51 loc) · 1.93 KB
/
passport-google-oauth.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// 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-google-oauth' {
import passport = require('passport');
import express = require('express');
interface Profile extends passport.Profile {
gender: string;
_raw: string;
_json: any;
}
interface IOAuthStrategyOption {
consumerKey: string;
consumerSecret: string;
callbackURL: string;
reguestTokenURL?: string;
accessTokenURL?: string;
userAuthorizationURL?: string;
sessionKey?: string;
}
class OAuthStrategy implements passport.Strategy {
constructor(options: IOAuthStrategyOption,
verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);
name: string;
authenticate: (req: express.Request, options?: Object) => void;
}
interface IOAuth2StrategyOption {
clientID: string;
clientSecret: string;
callbackURL: string;
authorizationURL?: string;
tokenURL?: string;
accessType?: string;
approval_prompt?: string;
prompt?: string;
loginHint?: string;
userID?: string;
hostedDomain?: string;
display?: string;
requestVisibleActions?: string;
openIDRealm?: string;
}
class OAuth2Strategy implements passport.Strategy {
constructor(options: IOAuth2StrategyOption,
verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);
name: string;
authenticate: (req: express.Request, options?: Object) => void;
}
}