correct previous mistakes due to bad docs

This commit is contained in:
Simon Schick
2018-03-02 04:46:48 +01:00
parent b32853073c
commit 689065bd14
2 changed files with 4 additions and 22 deletions

View File

@@ -38,7 +38,8 @@ server.register({
};
},
verifyOptions: {
algorithms: ['HS256']
algorithms: ['HS256'],
issuer: 'test',
}
};
server.auth.strategy('jwt', 'jwt', opts);

View File

@@ -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