From b133d67251650c317c8a2f19108f9466076b963a Mon Sep 17 00:00:00 2001 From: RobCatton <41433657+RobCatton@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:26:37 +0000 Subject: [PATCH] AHWR-320 - Added another console.log (#254) --- app/auth/azure-auth.js | 1 + app/auth/map-auth.js | 1 - app/config/auth.js | 2 ++ package.json | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/auth/azure-auth.js b/app/auth/azure-auth.js index 6dc90570..c2131d99 100644 --- a/app/auth/azure-auth.js +++ b/app/auth/azure-auth.js @@ -32,6 +32,7 @@ const authenticate = async (redirectCode, cookieAuth) => { }) console.log(JSON.stringify(token)) + console.log(JSON.stringify({ cookieAuth })) cookieAuth.set({ scope: token.idTokenClaims.roles, account: token.account diff --git a/app/auth/map-auth.js b/app/auth/map-auth.js index 19fc8f9e..39fb9d4e 100644 --- a/app/auth/map-auth.js +++ b/app/auth/map-auth.js @@ -2,7 +2,6 @@ const isInRole = require('./is-in-role') const { administrator, processor, user, recommender, authoriser } = require('./permissions') const mapAuth = (request) => { - console.log(request.auth) return { isAuthenticated: request.auth.isAuthenticated, isAnonymous: !request.auth.isAuthenticated, diff --git a/app/config/auth.js b/app/config/auth.js index 0a71048a..9fa14417 100644 --- a/app/config/auth.js +++ b/app/config/auth.js @@ -20,6 +20,8 @@ const { error, value } = schema.validate(config, { abortEarly: false }) if (error) { throw new Error(`The auth config is invalid. ${error.message}`) +} else { + console.log('config', JSON.stringify(value)) } module.exports = value diff --git a/package.json b/package.json index 2729d43a..caaea921 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffc-ahwr-backoffice", - "version": "1.24.83", + "version": "1.24.84", "description": "Back office of the health and welfare of your livestock", "homepage": "https://github.com/DEFRA/ffc-ahwr-backoffice", "main": "app/index.js",