Skip to content

Commit

Permalink
Swap out keycloak-connect for jsonwebtoken
Browse files Browse the repository at this point in the history
Implementation taken from COMS
  • Loading branch information
norrisng-bc committed Apr 22, 2024
1 parent 81d9dff commit 3a44388
Show file tree
Hide file tree
Showing 10 changed files with 336 additions and 687 deletions.
6 changes: 2 additions & 4 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ const helmet = require('helmet');

const { name: appName, version: appVersion } = require('./package.json');
const carboneCopyApi = require('./src/components/carboneCopyApi');
const keycloak = require('./src/components/keycloak');
const log = require('./src/components/log')(module.filename);
const httpLogger = require('./src/components/log').httpLogger;
const { getGitRevision, prettyStringify } = require('./src/components/utils');
const { getConfigBoolean, getGitRevision, prettyStringify } = require('./src/components/utils');
const v2Router = require('./src/routes/v2');

const { authorizedParty } = require('./src/middleware/authorizedParty');
Expand Down Expand Up @@ -52,9 +51,8 @@ if (process.env.NODE_ENV !== 'test') {
}

// Use Keycloak OIDC Middleware
if (config.has('keycloak.enabled')) {
if (getConfigBoolean('keycloak.enabled')) {
log.info('Running in authenticated mode');
app.use(keycloak.middleware());
} else {
log.info('Running in public mode');
}
Expand Down
Loading

0 comments on commit 3a44388

Please sign in to comment.