1.0.40 • Published 2 years ago

@types/passport-twitter v1.0.40

Weekly downloads
5,455
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/passport-twitter

Summary

This package contains type definitions for passport-twitter (https://github.com/jaredhanson/passport-twitter).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passport-twitter.

index.d.ts

// Type definitions for passport-twitter 1.0.4
// Project: https://github.com/jaredhanson/passport-twitter
// Definitions by: James Roland Cabresos <https://github.com/staticfunction>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <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 IStrategyOptionBase {
    consumerKey: string;
    consumerSecret: string;
    callbackURL: string;

    includeEmail?: boolean | undefined;
    includeStatus?: boolean | undefined;
    includeEntities?: boolean | undefined;

    requestTokenURL?: string | undefined;
    accessTokenURL?: string | undefined;
    userAuthorizationURL?: string | undefined;
    sessionKey?: string | undefined;

    forceLogin?: boolean | undefined;
    screenName?: string | undefined;

    userProfileURL?: string | undefined;
    skipExtendedUserProfile?: boolean | undefined;
}

interface IStrategyOption extends IStrategyOptionBase {
    passReqToCallback?: false | undefined;
}

interface IStrategyOptionWithRequest  extends IStrategyOptionBase {
    passReqToCallback: true;
}

declare class Strategy extends passport.Strategy {
    constructor(options: IStrategyOption,
        verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);
    constructor(options: IStrategyOptionWithRequest,
        verify: (req: express.Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);

    name: string;
    authenticate(req: express.Request, options?: Object): void;
}

Additional Details

Credits

These definitions were written by James Roland Cabresos.

1.0.39

2 years ago

1.0.38

2 years ago

1.0.40

2 years ago

1.0.37

4 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

7 years ago

1.0.33

8 years ago

1.0.32

8 years ago

1.0.31

8 years ago

1.0.30

9 years ago

1.0.29

9 years ago

1.0.28

9 years ago

1.0.27-alpha

9 years ago

1.0.26-alpha

9 years ago

1.0.25-alpha

9 years ago

1.0.24-alpha

9 years ago

1.0.23-alpha

9 years ago

1.0.22-alpha

9 years ago

1.0.21-alpha

9 years ago

1.0.16-alpha

9 years ago

1.0.15-alpha

9 years ago