0.0.3 • Published 6 months ago

@types/passport-orcid v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for passport-orcid 0.0
// Project: https://github.com/hubgit/passport-orcid
// Definitions by: Chris Wilkinson <https://github.com/thewilkybarkid>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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.

0.0.1

8 months ago

0.0.3

6 months ago

0.0.2

7 months ago

0.0.0

2 years ago