1.3.5 • Published 6 months ago

@types/passport-vkontakte v1.3.5

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

Installation

npm install --save @types/passport-vkontakte

Summary

This package contains type definitions for passport-vkontakte (https://github.com/stevebest/passport-vkontakte#readme).

Details

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

index.d.ts

// Type definitions for passport-vkontakte 1.3
// Project: https://github.com/stevebest/passport-vkontakte#readme
// Definitions by: Anton Lobashev <https://github.com/soulthreads>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import * as passport from 'passport';
import * as express from 'express';

export interface Profile extends passport.Profile {
    gender?: string | undefined;
    profileUrl?: string | undefined;

    _raw: string;
    _json: any;
}

export interface StrategyOptions {
    clientID: string;
    clientSecret: string;
    callbackURL: string;

    profileFields?: string[] | undefined;
    apiVersion?: string | undefined;

    lang?: string | undefined;
}

export type VerifyCallback = (error: any, user?: any, info?: any) => void;

export interface Params {
    accessToken: string;
    email?: string | undefined;
    expires_in: number;
    user_id: number;
}

export type VerifyFunctionWithParams = (
    accessToken: string,
    refreshToken: string,
    params: Params,
    profile: Profile,
    done: VerifyCallback
) => void;

export type VerifyFunction = (
    accessToken: string,
    refreshToken: string,
    profile: Profile,
    done: VerifyCallback
) => void;

export class Strategy implements passport.Strategy {
    constructor(
        options: StrategyOptions,
        verify: VerifyFunctionWithParams | VerifyFunction
    );

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

Additional Details

Credits

These definitions were written by Anton Lobashev.

1.3.5

6 months ago

1.3.4

7 months ago

1.3.3

8 months ago

1.3.2

10 months ago

1.3.1

3 years ago

1.3.0

6 years ago