Skip to content

Commit 048446f

Browse files
committed
chore: clean up auth methods
1 parent ec75f33 commit 048446f

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/service/passport/activeDirectory.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ const configure = (passport) => {
3131
profile.id = profile.username;
3232
req.user = profile;
3333

34-
console.log(
35-
`passport.activeDirectory: resolved login ${
36-
profile._json.userPrincipalName
37-
}, profile=${JSON.stringify(profile)}`,
38-
);
3934
// First check to see if the user is in the usergroups
4035
const isUser = await ldaphelper.isUserInAdGroup(profile.username, domain, userGroup);
4136

@@ -48,7 +43,6 @@ const configure = (passport) => {
4843
const isAdmin = await ldaphelper.isUserInAdGroup(profile.username, domain, adminGroup);
4944

5045
profile.admin = isAdmin;
51-
console.log(`passport.activeDirectory: ${profile.username} admin=${isAdmin}`);
5246

5347
const user = {
5448
username: profile.username,

src/service/passport/jwtAuthHandler.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const axios = require("axios");
22
const jwt = require("jsonwebtoken");
33
const jwkToPem = require("jwk-to-pem");
4+
const config = require('../../config');
45

56
/**
67
* Obtain the JSON Web Key Set (JWKS) from the OIDC authority.
@@ -65,7 +66,7 @@ async function validateJwt(token, authorityUrl, clientID, expectedAudience) {
6566

6667
const jwtAuthHandler = () => {
6768
return async (req, res, next) => {
68-
const apiAuthMethods = require('../../config').getAPIAuthMethods();
69+
const apiAuthMethods = config.getAPIAuthMethods();
6970
const jwtAuthMethod = apiAuthMethods.find((method) => method.type.toLowerCase() === "jwt");
7071
if (!jwtAuthMethod) {
7172
return next();

0 commit comments

Comments
 (0)