Skip to content

Commit

Permalink
refactor(service): users/auth: add todo tag comments for removing leg…
Browse files Browse the repository at this point in the history
…acy authentication configuration model references
  • Loading branch information
restjohn committed Sep 13, 2024
1 parent 21b9d7f commit 17a80ce
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions service/src/provision/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { modulesPathsInDir } = require('../utilities/loader');
const log = require('../logger');
// TODO: users-next
const AuthenticationConfiguration = require('../models/authenticationconfiguration');

/**
Expand Down
1 change: 1 addition & 0 deletions service/src/routes/authenticationconfigurations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const log = require('winston')
, AsyncLock = require('async-lock')
, access = require('../access')
, Authentication = require('../models/authentication')
// TODO: users-next
, AuthenticationConfiguration = require('../models/authenticationconfiguration')
, AuthenticationConfigurationTransformer = require('../transformers/authenticationconfiguration')
, SecretStoreService = require('../security/secret-store-service')
Expand Down
1 change: 1 addition & 0 deletions service/src/routes/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = function (app, security) {
, User = require('../models/user')
, Device = require('../models/device')
, userTransformer = require('../transformers/user')
// TODO: users-next
, AuthenticationConfiguration = require('../models/authenticationconfiguration');

function authorizeSetup(req, res, next) {
Expand Down
3 changes: 2 additions & 1 deletion service/src/security/utilities/secure-property-appender.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
'use strict';

const SecretStoreService = require('../secret-store-service')
// TODO: users-next
, AuthenticationConfiguration = require('../../models/authenticationconfiguration')

/**
* Helper function to append secure properties to a configuration under the settings property.
*
*
* @param {*} config Must contain the _id property
* @returns A copy of the config with secure properties appended (if any exist)
*/
Expand Down
1 change: 1 addition & 0 deletions service/src/transformers/authenticationconfiguration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";

// TODO: users-next
const AuthenticationConfiguration = require('../models/authenticationconfiguration');

function transformAuthenticationConfiguration(authenticationConfiguration, options) {
Expand Down
9 changes: 5 additions & 4 deletions service/src/utilities/authenticationApiAppender.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
"use strict";

const extend = require('util')._extend
// TODO: users-next
, AuthenticationConfiguration = require('../models/authenticationconfiguration')
, AuthenticationConfigurationTransformer = require('../transformers/authenticationconfiguration');

/**
* Appends authenticationStrategies to the config.api object (the original config.api is not modified; this method returns a copy).
* Appends authenticationStrategies to the config.api object (the original config.api is not modified; this method returns a copy).
* These strategies are read from the db.
*
* @param {*} api
* @param {*} options
*
* @param {*} api
* @param {*} options
* @returns Promise containing the modified copy of the api parameter
*/
async function append(api, options) {
Expand Down

0 comments on commit 17a80ce

Please sign in to comment.