Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Meijer committed Aug 21, 2023
1 parent b1043a3 commit 9d7aa44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ function validateConfig(configOrFileName) {
assertString('config.authentication.jwt.privateKey', config.authentication.jwt.privateKey);
assertString('config.authentication.jwt.publicKey', config.authentication.jwt.publicKey);
if (config.authentication.enable && config.authentication.jwt.allowInsecureKeySizes) {
console.warn('config.authentication.jwt.allowInsecureKeySizes is true by default to avoid breaking changes ' +
'due to: https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9.');
console.warn('WARNING! config.authentication.jwt.allowInsecureKeySizes is true by default to avoid breaking ' +
'changes due to: https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9.');
console.warn('If you know your RSA key size is 2048 bits or greater you can avoid this warning by setting ' +
'allowInsecureKeySizes to false.');
}
Expand Down
5 changes: 3 additions & 2 deletions test/server/middleware/auth/gmeauth.special.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*globals require*/
/*globals*/
/*eslint-env node, mocha*/
/**
* @author kecso / https://github.com/kecso
Expand All @@ -19,7 +19,8 @@ describe('GME authentication special tests', function () {
privateKey = null,
jwtOptions = {
algorithm: baseConfig.authentication.jwt.algorithm,
expiresIn: baseConfig.authentication.jwt.expiresIn
expiresIn: baseConfig.authentication.jwt.expiresIn,
allowInsecureKeySizes: true,
},
getToken = tokenData => {
return Q.ninvoke(jwt, 'sign', tokenData, privateKey, jwtOptions);
Expand Down

0 comments on commit 9d7aa44

Please sign in to comment.