npm.io
0.0.3 • Published 2 years ago

@types/passport-orcid

Licence
MIT
Version
0.0.3
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

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.