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

1.0.0 • Public • Published

Installation

npm install --save @types/passport-weibo

Summary

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

Details

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

index.d.ts

import { Profile } from "passport";
import { Strategy as OAuth2Strategy, VerifyCallback } from "passport-oauth2";

declare namespace PassportWeibo {
    interface Options {
        clientID: string;
        clientSecret: string;
        callbackURL: string;
        authorizationURL?: string;
        tokenURL?: string;
        scopeSeparator?: string;
        customHeaders?: Record<string, string>;
    }

    interface User extends Profile {
        provider: "weibo";
        id: string;
        displayName: string;
        _raw: object;
        _json: object;
    }

    type UserProfileCallback = (err: Error | null, user: User) => void;

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

    class Strategy extends OAuth2Strategy {
        constructor(options: Options, verify: VerifyFunction);

        userProfile(accessToken: string, done: UserProfileCallback): void;
    }
}
export = PassportWeibo.Strategy;

Additional Details

Credits

These definitions were written by bangbang93.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/passport-weibo

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

4.77 kB

Total Files

5

Last publish

Collaborators

  • types