@types/passport-vkontakte
TypeScript icon, indicating that this package has built-in type declarations

1.3.5 • Public • Published

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

import * as express from "express";
import * as passport from "passport";

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?: any): void;
}

Additional Details

Credits

These definitions were written by Anton Lobashev.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/passport-vkontakte

Weekly Downloads

393

Version

1.3.5

License

MIT

Unpacked Size

5.28 kB

Total Files

5

Last publish

Collaborators

  • types