@apolitical/server 2.10.1 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/server",
3
- "version": "2.10.1",
3
+ "version": "3.0.0-beta.1",
4
4
  "description": "Node.js module to encapsulate Apolitical's express server setup",
5
5
  "author": "Apolitical Group Limited <engineering@apolitical.co>",
6
6
  "license": "MIT",
package/src/config.js CHANGED
@@ -3,6 +3,7 @@
3
3
  const { NODE_ENV, LOG_LEVEL } = process.env;
4
4
 
5
5
  const NAME = 'apolitical-server';
6
+ const UUID = '812c9f40-af4b-4718-b41d-54c8a81e148d';
6
7
  const VERSION = '2.6.0';
7
8
  const ADMIN_ROLE = 'administrator';
8
9
 
@@ -105,7 +106,7 @@ module.exports = {
105
106
  DEFAULT_PAYLOAD: {
106
107
  role: ADMIN_ROLE,
107
108
  admin: true,
108
- slug: NAME,
109
+ id: UUID,
109
110
  iss: NAME,
110
111
  sub: 'login',
111
112
  },
@@ -17,7 +17,7 @@ module.exports = ({ passport, passportJwt, config }) => {
17
17
  if (jwtPayload.sub !== 'login') {
18
18
  return done(null, false, { message: jwtPayload });
19
19
  }
20
- if (!jwtPayload.slug) {
20
+ if (!jwtPayload.id) {
21
21
  return done(null, false, { message: jwtPayload });
22
22
  }
23
23
  return done(null, jwtPayload);