Skip to content

Commit

Permalink
Fix server_config.token_options.claim property (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi authored Apr 13, 2023
1 parent bc955ff commit 9c0709a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ if (cfg.globalConf.auth_mode !== 'openidconnect') {

const algorithm = tokenOptions.algorithm || 'HS256'
const expiresIn = tokenOptions.expires_in || '12h'
const claim = tokenOptions.expires_in || 'sub'
const claim = tokenOptions.claim || 'sub'
const claimObj = {}
claimObj[claim] = username
const jwtToken = jwt.sign(claimObj, secretOrPrivateKey, {expiresIn: expiresIn, algorithm});
Expand Down

0 comments on commit 9c0709a

Please sign in to comment.