Skip to content

Commit

Permalink
Add defineRoutes backs
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed May 22, 2024
1 parent 80c1c38 commit f777798
Show file tree
Hide file tree
Showing 2 changed files with 231 additions and 249 deletions.
13 changes: 3 additions & 10 deletions server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import { first } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { inspect } from 'util';
import {
PluginInitializerContext,
CoreSetup,
Expand All @@ -28,7 +27,7 @@ import {
} from '../../../src/core/server';

import { SecurityPluginSetup, SecurityPluginStart } from './types';
import { defineRoutes, defineCommonRoutes, defineSecurityConfigurationRoutes } from './routes';
import { defineRoutes } from './routes';
import { SecurityPluginConfigType } from '.';
import opensearchSecurityConfigurationPlugin from './backend/opensearch_security_configuration_plugin';
import opensearchSecurityPlugin from './backend/opensearch_security_plugin';
Expand Down Expand Up @@ -180,15 +179,9 @@ export class SecurityPlugin implements Plugin<SecurityPluginSetup, SecurityPlugi
core.security.registerReadonlyService(service);
}

defineCommonRoutes(router, dataSourceEnabled);
// Register server side APIs
if (config.configuration.session_management_enabled) {
defineRoutes(router, dataSourceEnabled);
defineAuthTypeRoutes(router, config);
}
if (config.configuration.admin_pages_enabled) {
defineSecurityConfigurationRoutes(router, dataSourceEnabled);
}
defineRoutes(router, dataSourceEnabled);
defineAuthTypeRoutes(router, config);

return {
config$,
Expand Down
Loading

0 comments on commit f777798

Please sign in to comment.