mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 01:47:21 +08:00
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
// 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/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="passport"/>
|
|
|
|
|
|
|
|
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;
|
|
}
|
|
|
|
declare 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;
|
|
}
|