From aeba5ae6852893d7c53e683c6b625bac3fa54ae4 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Scheffer <31517030+carlosscheffer@users.noreply.github.com> Date: Fri, 27 Oct 2017 22:01:17 -0200 Subject: [PATCH] [passport-jwt] Fix the missing secretOrKeyProvider (#20615) * Fix the missing secretOrKeyProvider In passport-jwt v3.0.0 it has dynamic secretOrKey support, but has not been implemented so far in DefinitelyTyped. This commit corrects this. * Update index.d.ts --- types/passport-jwt/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/passport-jwt/index.d.ts b/types/passport-jwt/index.d.ts index f1c87c40ed..c300276fe2 100644 --- a/types/passport-jwt/index.d.ts +++ b/types/passport-jwt/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for passport-jwt 2.0 +// Type definitions for passport-jwt 3.0 // Project: https://github.com/themikenicholson/passport-jwt // Definitions by: TANAKA Koichi // Alex Young // David Ng +// Carlos Eduardo Scheffer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -15,7 +16,8 @@ export declare class Strategy extends PassportStrategy { } export interface StrategyOptions { - secretOrKey: string | Buffer; + secretOrKey?: string | Buffer; + secretOrKeyProvider?: any; jwtFromRequest: JwtFromRequestFunction; issuer?: string; audience?: string;