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

0.0.3 • Public • Published

Installation

npm install --save @types/passport-orcid

Summary

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

Details

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

index.d.ts

import OAuth2Strategy = require("passport-oauth2");

type OrcidStrategyOptions<
    T extends Omit<OAuth2Strategy.StrategyOptions, "passReqToCallback">,
> = Omit<T, "authorizationURL" | "tokenURL"> & {
    sandbox?: boolean;
};

declare class OrcidStrategy extends OAuth2Strategy {
    name: "orcid";

    constructor(
        options: OrcidStrategy.StrategyOptions,
        verify: OrcidStrategy.VerifyFunction,
    );
    constructor(
        options: OrcidStrategy.StrategyOptionsWithRequest,
        verify: OrcidStrategy.VerifyFunctionWithRequest,
    );
}

declare namespace OrcidStrategy {
    type StrategyOptions = OrcidStrategyOptions<OAuth2Strategy.StrategyOptions>;
    type StrategyOptionsWithRequest = OrcidStrategyOptions<OAuth2Strategy.StrategyOptionsWithRequest>;

    type VerifyFunction = OAuth2Strategy.VerifyFunction;
    type VerifyFunctionWithRequest = OAuth2Strategy.VerifyFunctionWithRequest;

    type Strategy = OrcidStrategy;
    const Strategy: typeof OrcidStrategy;
}

export = OrcidStrategy;

Additional Details

Credits

These definitions were written by Chris Wilkinson.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/passport-orcid

Weekly Downloads

4

Version

0.0.3

License

MIT

Unpacked Size

4.76 kB

Total Files

5

Last publish

Collaborators

  • types