npm.io
1.0.10 • Published 11 months ago

@types/passport-beam

Licence
MIT
Version
1.0.10
Deps
2
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/passport-beam

Summary

This package contains type definitions for passport-beam (https://github.com/alfw/passport-beam).

Details

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

index.d.ts

/// <reference types="passport"/>
/// <reference types="express"/>

import express = require("express");
import * as passport from "passport";

export class Strategy extends passport.Strategy {
    constructor(
        options: Strategy.IStrategyOption,
        verify: (
            accessToken: string,
            refreshToken: string,
            profile: Strategy.Profile,
            done: (error: any, user?: any) => void,
        ) => void,
    );
    name: string;
    authenticate(req: express.Request, options?: Object): void;
}

export namespace Strategy {
    interface IStrategyOption {
        clientID: string;
        clientSecret: string;
        callbackURL: string;
    }

    interface Profile extends passport.Profile {
        profileUrl: string;
        id: any;
        username: string;
        provider: string;
        email: string;
        _raw: any;
        _json: any;
    }
}

Additional Details

Credits

These definitions were written by AtlasDev.