mirror of
https://github.com/dadosfera/maestro.git
synced 2026-12-01 15:40:05 +00:00
O auth module
This commit is contained in:
+9
-29
@@ -1,29 +1,16 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
|
||||
import { HealthController } from './modules/health/health.controller';
|
||||
|
||||
import { HealthService } from './modules/health/health.service';
|
||||
|
||||
import { CatalogController } from './modules/catalog/catalog.controller';
|
||||
import { CatalogService } from './modules/catalog/catalog.service';
|
||||
import { getOauthSecrets } from './utils/OauthSecrets';
|
||||
import { HubspotStrategy } from './modules/oauth/passport-strategies/hubspot-strategy';
|
||||
import { FacebookStrategy } from './modules/oauth/passport-strategies/facebook-strategy';
|
||||
import { AuthenticationGuard } from './authentication/authentication.guard';
|
||||
|
||||
import { APP_GUARD } from '@nestjs/core';
|
||||
import { GoogleStrategy } from './modules/oauth/passport-strategies/google-strategy';
|
||||
import { MailChimpStrategy } from './modules/oauth/passport-strategies/mailchimp-strategy';
|
||||
import { SalesforceStrategy } from './modules/oauth/passport-strategies/salesforce-strategy';
|
||||
|
||||
import { UsersModule } from './modules/users/users.module';
|
||||
import { RolesModule } from './modules/roles/roles.module';
|
||||
|
||||
import { ConnectorModule } from './modules/connector/connector.module';
|
||||
import { AuthModule } from './modules/auth/auth.module';
|
||||
import { PermissionsModule } from './modules/permissions/permissions.module';
|
||||
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
import { TermsOfUseModule } from './modules/termsOfUse/termsOfUse.module';
|
||||
import { ConnectionModule } from './modules/connection/connection.module';
|
||||
import { ConnectionTestModule } from './modules/connection-test/connection-test.module';
|
||||
@@ -32,19 +19,14 @@ import { InputsModule } from './modules/inputs/inputs.module';
|
||||
import { OauthModule } from './modules/oauth/oauth.module';
|
||||
import { PipelinesModule } from './modules/pipelines/pipelines.module';
|
||||
import { TransformationsModule } from './modules/transformations/transformations.module';
|
||||
import { HealthModule } from './modules/health/health.module';
|
||||
import { CatalogModule } from './modules/catalog/catalog.module';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
|
||||
@Module({
|
||||
controllers: [HealthController, CatalogController],
|
||||
controllers: [],
|
||||
providers: [
|
||||
DadosferaLogger,
|
||||
{ provide: 'OAUTH_SECRETS', useValue: getOauthSecrets() },
|
||||
HealthService,
|
||||
CatalogService,
|
||||
HubspotStrategy,
|
||||
FacebookStrategy,
|
||||
GoogleStrategy,
|
||||
MailChimpStrategy,
|
||||
SalesforceStrategy,
|
||||
{
|
||||
provide: APP_GUARD,
|
||||
useClass: AuthenticationGuard,
|
||||
@@ -63,13 +45,11 @@ import { TransformationsModule } from './modules/transformations/transformations
|
||||
ConnectionTestModule,
|
||||
PipelinesModule,
|
||||
TransformationsModule,
|
||||
|
||||
HealthModule,
|
||||
CatalogModule,
|
||||
UsersModule,
|
||||
|
||||
RolesModule,
|
||||
|
||||
InputsModule,
|
||||
|
||||
OauthModule,
|
||||
],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
|
||||
import { CatalogController } from './catalog.controller';
|
||||
import { CatalogService } from './catalog.service';
|
||||
|
||||
@Module({
|
||||
controllers: [CatalogController],
|
||||
providers: [CatalogService, DadosferaLogger],
|
||||
})
|
||||
export class CatalogModule {}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
|
||||
import { HealthController } from './health.controller';
|
||||
import { HealthService } from './health.service';
|
||||
|
||||
@Module({
|
||||
controllers: [HealthController],
|
||||
providers: [HealthService, DadosferaLogger],
|
||||
})
|
||||
export class HealthModule {}
|
||||
@@ -2,7 +2,23 @@ import { Module } from '@nestjs/common';
|
||||
import { InputsModule } from '../inputs/inputs.module';
|
||||
import { OauthController } from './oauth.controller';
|
||||
|
||||
import { getOauthSecrets } from '../../utils/OauthSecrets';
|
||||
|
||||
import { HubspotStrategy } from './passport-strategies/hubspot-strategy';
|
||||
import { FacebookStrategy } from './passport-strategies/facebook-strategy';
|
||||
import { GoogleStrategy } from './passport-strategies/google-strategy';
|
||||
import { MailChimpStrategy } from './passport-strategies/mailchimp-strategy';
|
||||
import { SalesforceStrategy } from './passport-strategies/salesforce-strategy';
|
||||
|
||||
@Module({
|
||||
providers: [
|
||||
{ provide: 'OAUTH_SECRETS', useValue: getOauthSecrets() },
|
||||
HubspotStrategy,
|
||||
FacebookStrategy,
|
||||
GoogleStrategy,
|
||||
MailChimpStrategy,
|
||||
SalesforceStrategy,
|
||||
],
|
||||
controllers: [OauthController],
|
||||
imports: [InputsModule],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user