mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Convert saml controller to decorator style (#5653) (no-changelog)
This commit is contained in:
committed by
GitHub
parent
90afa5e55f
commit
c6ba0bd8de
@@ -153,9 +153,8 @@ import {
|
||||
isAdvancedExecutionFiltersEnabled,
|
||||
} from './executions/executionHelpers';
|
||||
import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers';
|
||||
import { samlControllerPublic } from './sso/saml/routes/saml.controller.public.ee';
|
||||
import { SamlController } from './sso/saml/routes/saml.controller.ee';
|
||||
import { SamlService } from './sso/saml/saml.service.ee';
|
||||
import { samlControllerProtected } from './sso/saml/routes/saml.controller.protected.ee';
|
||||
import { LdapManager } from './Ldap/LdapManager.ee';
|
||||
|
||||
const exec = promisify(callbackExec);
|
||||
@@ -370,6 +369,7 @@ class Server extends AbstractServer {
|
||||
const internalHooks = Container.get(InternalHooks);
|
||||
const mailer = getMailerInstance();
|
||||
const postHog = this.postHog;
|
||||
const samlService = SamlService.getInstance();
|
||||
|
||||
const controllers: object[] = [
|
||||
new AuthController({ config, internalHooks, repositories, logger, postHog }),
|
||||
@@ -389,6 +389,7 @@ class Server extends AbstractServer {
|
||||
logger,
|
||||
postHog,
|
||||
}),
|
||||
new SamlController(samlService),
|
||||
];
|
||||
|
||||
if (isLdapEnabled()) {
|
||||
@@ -514,9 +515,6 @@ class Server extends AbstractServer {
|
||||
}
|
||||
}
|
||||
|
||||
this.app.use(`/${this.restEndpoint}/sso/saml`, samlControllerPublic);
|
||||
this.app.use(`/${this.restEndpoint}/sso/saml`, samlControllerProtected);
|
||||
|
||||
// ----------------------------------------
|
||||
// Returns parameter values which normally get loaded from an external API or
|
||||
// get generated dynamically
|
||||
|
||||
Reference in New Issue
Block a user