mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[passport-oauth2-refresh] Updated types (#40288)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
19c417168f
commit
484ad440d4
+4
-1
@@ -1,13 +1,16 @@
|
||||
// Type definitions for passport-oauth2-refresh 1.1
|
||||
// Project: https://github.com/fiznool/passport-oauth2-refresh#readme
|
||||
// Definitions by: Daphne Smit <https://github.com/daphnesmit>
|
||||
// Brian Torres-Gil <https://github.com/btorresgil>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Strategy } from 'passport-oauth2';
|
||||
import { oauth2tokenCallback } from 'oauth';
|
||||
|
||||
export function use(name: string | Strategy, strategy?: Strategy): void;
|
||||
|
||||
export function has(name: string): boolean;
|
||||
|
||||
export function requestNewAccessToken(name: string, refreshToken: string, params: any, done: () => any): any;
|
||||
export function requestNewAccessToken(name: string, refreshToken: string, done: oauth2tokenCallback): any;
|
||||
export function requestNewAccessToken(name: string, refreshToken: string, params: any, done: oauth2tokenCallback): any;
|
||||
|
||||
@@ -17,4 +17,5 @@ const strategy1: OAuth2Strategy = new OAuth2Strategy(strategyOptions1, verifyFun
|
||||
|
||||
use('strategy1', strategy1);
|
||||
|
||||
requestNewAccessToken('strategy1', 'exampleRefreshToken', {}, () => {});
|
||||
requestNewAccessToken('strategy1', 'exampleRefreshToken', (err, accessToken, refreshToken, results) => {});
|
||||
requestNewAccessToken('strategy1', 'exampleRefreshToken', {}, (err, accessToken, refreshToken, results) => {});
|
||||
|
||||
Reference in New Issue
Block a user