1.0.4 • Published 6 months ago

@types/passport-instagram-token v1.0.4

Weekly downloads
28
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/passport-instagram-token

Summary

This package contains type definitions for passport-instagram-token (https://github.com/ghaiklor/passport-instagram-token).

Details

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

index.d.ts

// Type definitions for passport-instagram-token 1.0
// Project: https://github.com/ghaiklor/passport-instagram-token
// Definitions by: Sagar Jain <https://github.com/sagar7993>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// TypeScript Version: 2.3

import passport = require('passport');
import express = require('express');

export interface Profile extends passport.Profile {
    id: string;
    displayName: string;
    name: { familyName: string, givenName: string };
    username: string;

    _raw: string;
    _json: any;
}

export interface StrategyOptionBase {
    clientID: string;
    clientSecret: string;
    callbackURL: string;
    tokenURL?: string | undefined;
    authorizationURL?: string | undefined;
}

export interface StrategyOption extends StrategyOptionBase {
    passReqToCallback?: false | undefined;
}

export interface StrategyOptionWithRequest extends StrategyOptionBase {
    passReqToCallback: true;
}

export class Strategy extends passport.Strategy {
    constructor(options: StrategyOption,
        verify: (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any) => void) => void);
    constructor(options: StrategyOptionWithRequest,
        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;
}

export as namespace Strategy;

Additional Details

Credits

These definitions were written by Sagar Jain.

1.0.2

8 months ago

1.0.4

6 months ago

1.0.3

7 months ago

1.0.1

3 years ago

1.0.0

4 years ago