1.5.6 • Published 6 months ago

@types/passport-linkedin-oauth2 v1.5.6

Weekly downloads
2,103
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/passport-linkedin-oauth2

Summary

This package contains type definitions for passport-linkedin-oauth2 (https://github.com/auth0/passport-linkedin-oauth2).

Details

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

index.d.ts

// Type definitions for passport-linkedin-oauth2 1.5
// Project: https://github.com/auth0/passport-linkedin-oauth2
// Definitions by: Andrew Vetovitz <https://github.com/andrewvetovitz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import { Profile as passportProfile, AuthenticateOptions as PassportAuthenticateOptions, Strategy as passportStrategy } from 'passport';
import { Request } from 'express';

export interface Profile extends passportProfile {
    id: string;
    displayName: string;
    name: {
        familyName: string;
        givenName: string;
    };
    emails: [{ value: string }];
    photos: [{ value: string }];
    _raw: string;
    _json: any;
}

export interface AuthenticateOptions extends PassportAuthenticateOptions {
    authType?: string | undefined;
}

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

    scope?: string[] | undefined;
    scopeSeparator?: string | undefined;
    enableProof?: boolean | undefined;
    profileFields?: string[] | undefined;
}

export interface StrategyOptionWithRequest extends StrategyOption {
    passReqToCallback: true;
}

export type VerifyFunction =
    (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void;

export type VerifyFunctionWithRequest =
    (req: Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void;

export class Strategy extends passportStrategy {
    constructor(options: StrategyOptionWithRequest, verify: VerifyFunctionWithRequest);
    constructor(options: StrategyOption, verify: VerifyFunction);

    name: string;
    authenticate(req: Request, options?: object): void;
}

Additional Details

Credits

These definitions were written by Andrew Vetovitz.

1.5.6

6 months ago

1.5.5

7 months ago

1.5.4

8 months ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

5 years ago

1.5.0

5 years ago