diff --git a/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts index bcf226cbbf..cf51162eb4 100644 --- a/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts +++ b/types/hapi-auth-jwt2/hapi-auth-jwt2-tests.ts @@ -38,7 +38,8 @@ server.register({ }; }, verifyOptions: { - algorithms: ['HS256'] + algorithms: ['HS256'], + issuer: 'test', } }; server.auth.strategy('jwt', 'jwt', opts); diff --git a/types/hapi-auth-jwt2/index.d.ts b/types/hapi-auth-jwt2/index.d.ts index efc4010cb4..a93f740bfc 100644 --- a/types/hapi-auth-jwt2/index.d.ts +++ b/types/hapi-auth-jwt2/index.d.ts @@ -6,6 +6,7 @@ // TypeScript Version: 2.4 import { Request, ResponseObject, Plugin, ResponseToolkit } from 'hapi'; +import { VerifyOptions } from 'jsonwebtoken'; declare module 'hapi' { interface ServerAuth { @@ -62,27 +63,7 @@ declare namespace hapiAuthJwt2 { /** * Settings to define how tokens are verified by the jsonwebtoken library */ - verifyOptions?: { - /** - * Ignore expired tokens - */ - ignoreExpiration?: boolean; - - /** - * Do not enforce token audience - */ - audience?: boolean; - - /** - * Do not require the issuer to be valid - */ - issuer?: boolean; - - /** - * List of allowed algorithms - */ - algorithms?: string[]; - }; + verifyOptions?: VerifyOptions; /** * function called to decorate the response with authentication headers