backend-plugin-api: remove identity and token manager services

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-08-21 15:31:15 +02:00
parent 337a4704a6
commit 1780a67bc5
47 changed files with 86 additions and 507 deletions
@@ -14,12 +14,7 @@
* limitations under the License.
*/
import {
Backend,
createSpecializedBackend,
identityServiceFactory,
tokenManagerServiceFactory,
} from '@backstage/backend-app-api';
import { Backend, createSpecializedBackend } from '@backstage/backend-app-api';
import { authServiceFactory } from '@backstage/backend-defaults/auth';
import { cacheServiceFactory } from '@backstage/backend-defaults/cache';
import { databaseServiceFactory } from '@backstage/backend-defaults/database';
@@ -47,7 +42,6 @@ export const defaultServiceFactories = [
discoveryServiceFactory,
httpAuthServiceFactory,
httpRouterServiceFactory,
identityServiceFactory,
lifecycleServiceFactory,
loggerServiceFactory,
permissionsServiceFactory,
@@ -56,7 +50,6 @@ export const defaultServiceFactories = [
rootLifecycleServiceFactory,
rootLoggerServiceFactory,
schedulerServiceFactory,
tokenManagerServiceFactory,
userInfoServiceFactory,
urlReaderServiceFactory,
eventsServiceFactory,
@@ -19,7 +19,6 @@ import {
mockServices,
registerMswTestHooks,
} from '@backstage/backend-test-utils';
import { tokenManagerServiceFactory } from '@backstage/backend-app-api';
import { authServiceFactory } from './authServiceFactory';
import { base64url, decodeJwt } from 'jose';
import { discoveryServiceFactory } from '../discovery';
@@ -32,7 +31,6 @@ const server = setupServer();
// TODO: Ship discovery mock service in the service factory tester
const mockDeps = [
discoveryServiceFactory,
tokenManagerServiceFactory,
mockServices.rootConfig.factory({
data: {
backend: {
@@ -35,13 +35,11 @@ export const permissionsServiceFactory = createServiceFactory({
auth: coreServices.auth,
config: coreServices.rootConfig,
discovery: coreServices.discovery,
tokenManager: coreServices.tokenManager,
},
async factory({ auth, config, discovery, tokenManager }) {
async factory({ auth, config, discovery }) {
return ServerPermissionClient.fromConfig(config, {
auth,
discovery,
tokenManager,
});
},
});